您的位置:首页 > 数据库

sql学习笔记一 语法

2016-05-25 19:39 274 查看

select选出表格

select store-name from stroe-information

distinct读取不同资料

select distinct store-name from stroe-information

where选择性抓取资料

select store-name from store-information where sales》1000

and or组合简单条件

select stroe-name from store-information where sales》1000 or(sales《500 and sales》275)

in在不连续的值内抓已知数据

select* from stroe-information where store-name in(‘los’,‘san’)

between在一个范围内抓已知数据

select* from store-informaion where date between ‘jan’ and ‘mar‘

like依据模式找资料

select* from store-information where store-name like ’%AN%‘

order by 排列资料

select store-name,sales,date from store-information order by sales DESC
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  sql