项目中用的一直是hhs,所以很少接触sql语句,闲来无事就总结一下平时常用的sql语句:
1、关键字:create update alter drop insert exec select declare open fetch close if while case when where union
max avg min data as group by order by having
2、简单查询
select * from table
条件查询
select * from table where
字表查询
select a.field1,b.field1 from table1 a,table2 b where a.id=b.name
分组查询
select Name,max(column) from table group by Name union view
3、组合查询
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。