写出sql语句,查询所有年龄大于20岁的员工 | ||
2 | select * from employee where age>20; | |
3 | 写出sql语句,查询所有年龄大于等于22小于25的女性员工 | |
4 | select * from employee where age between 22 and 25 and sex=’女’; | |
5 | 写出sql语句,统计男女员工各有多少名 | |
6 | select Sex,count(*) as count from employee group by Sex; | |
7 | 写出sql语句,按照年龄降序获取员工信息 | |
8 | select * from emloyee where age index; | |
9 | 写出sql语句,获取员工中哪个姓名具有重名现象 | |
10 | select Name,count(*) as count from employee group by Name having count>1; | |
11 | 写出sql语句,查询所有姓张的员工 | |
12 | select * from employee where Name like ‘张%’; | |
13 | 写出sql语句,查询住址为北京的前3条记录 | |
14 | select * from employee where Address=’北京’ limit 3; | |
15 | 写出sql语句,查询员工总数 | |
16 | select count(*) from employee; | |
17 | 写出sql语句,向表中插入一条记录 | |
18 | insert into employee | |
19 | values(“周一”,“男”,“25”,“张家口”); | |
20 | 写出sql语句,修改员工张四的住址为南京 | |
21 | update employee set Address=’南京‘ where Name=’张四’; | |
22 | 写出sql语句,删除年龄大于24岁的女员工 | |
23 |
原文地址:https://blog.csdn.net/qq_59509490/article/details/134672203
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_11489.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。