sqlserver学习札记
发布时间:2020-12-12 15:04:49 所属栏目:MsSql教程 来源:网络整理
导读:项目中用的一直是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?
项目中用的一直是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、组合查询 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |