关于sql语句

//增加 insert into  a(name,score) values() //删除 delete from biao where 字段 truncate biao //更新数据 update biao set 字段=新 //查询数据 select ziduan from biao where tiaojian //查询所有 select from biao //使用别名 select ziduan as ‘‘,ziduan2 from biao //where条件 select*from biao where ziduan1 and ziduan2 //between and select * from biao where ziduan between and //空条件查询 select * from biao where ziduan IS Null //模糊查询 select * from biao where ziduan like ‘%w%‘ //去除重复数据 select distinct ziduan from biao //排序 select * from biao order by lieming asc/desc //聚合查询 select count(lieming)tiaojian  from biao; select  min(lieming)tiaojian  from biao; select max() tiaojianfrom biao; select  avg() tiaojianfrom biao; select sum() tiaojianfrom biao; //分组查询 select count(lieming) boys from ziduan group by tiaojian; //筛选条件后使用 select count(lieming) boys from ziduan group by tiaojian having;

相关文章