sql学习笔记一 语法

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



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值