sql server sql高级查询语句小结
22页1、SQL Server SQL高级查询语句小结 基本常用查询 -select select * from student; -all 查询所有select all sex from student; -distinct 过滤重复select distinct sex from student; -count 统计 select count(*) from student; select count(sex) from student; select count(distinct sex) from student; -top 取前N条记录 select top 3 * from student; -alias column name 列重命名 select id as 编号, name 名称, sex 性别 from student; -alias table name 表重命名 select id, name, s.id, s.name from student s; -column 列运算 select (age + id) col from student; select s.na
2、me + - + c.name from classes c, student s where s.cid = c.id; -where 条件 select * from student where id = 2; select * from student where id 7; select * from student where id 3; select * from student where id 3;(不等于)!=(不等于)select * from student where id = 3; select * from student where id 3; select * from student where id ! 2 and sex = 1; -or 或者 select * from student where id = 2 or sex = 1; -between . and . 相当于并且 select * from student where id between 2 and 5; select * from student where id not b
3、etween 2 and 5; -like 模糊查询 select * from student where name like %a%; select * from student where name like %ao%; select * from student where name not like %a%; select * from student where name like ja%; select * from student where name not like %j,n%; select * from student where name like %j,n,a%; select * from student where name like %ja,as,on%; select * from student where name like %ja_on%; -in 子查询 select * from student where id in (1, 2); -not in 不在其中 select * from student where id not in (1
《sql server sql高级查询语句小结》由会员小**分享,可在线阅读,更多相关《sql server sql高级查询语句小结》请在金锄头文库上搜索。
2020年高考真题——理科综合(全国卷Ⅲ)+Word版含答案
2021年绝味鸭脖策划书
2021年熟食店创业方案
2021年熟食店开店策划
2021年卤菜店创业计划书
2021年周黑鸭网络营销策划方案
东大21年1月考试《现代设计方法》考核作业
谈我国行政管理效率的现状及其改观对策(论文)
单证员考试-备考辅导-复习资料:无贸易背景信用证案分析.docx
土木工程毕业生答辩自述.docx
建筑学毕业后工作状态真实写照.doc
C#代码规范(湖南大学).doc
xx区食药监局2019年工作总结及2020年工作计划
2019年中医院药物维持治疗门诊工人先锋号先进事迹
2019年度xx乡镇林长制工作总结
2019年性艾科工作计划书
2019年人才服务局全国扶贫日活动开展情况总结
关于组工信息选题的几点思考
摘了穷帽子 有了新模样
2019年某集团公司基层党支部书记培训班心得体会
2024-03-13 36页
2024-03-13 12页
2024-03-13 15页
2024-03-13 35页
2024-03-04 55页
2024-03-04 57页
2024-03-04 137页
2024-03-04 65页
2024-02-23 12页
2024-02-23 3页