数据库 t-sql 语句
时间:2021-07-01 10:21:17
帮助过:32人阅读
car
set oil
=7.4 where oil
=4.7 --将oil为4.7修改为oil=7.4
delete from car
where oil
=9.5 --删除oil=9.5的
select name
from car
--条件查询 只查询一列
select name
from car
where oil
=7.4--查询一列并且oil=7.4
select name,oil
from car
where oil
=7.4 --只显示name跟oil两行并且是oil=7.4的
select * from car
where name
like ‘%宝马%‘--模糊查询 查询名字中带有宝马的
select* from car
order by oil
asc --将oil按顺序从小到大排序
select* from car
order by oil
desc --将oil按顺序从小到大排序
select distinct powers
from car
--去重查询
select oil
from car
group by oil
--分组查询
数据库 t-sql 语句
标签:查询 子查询 logs 顺序 高级 逗号 update 表名 order by