练 习

|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 写出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 | delete from employee where Sex='女' and Age>24; java第二十四课. · 7719ec3 · WL---code/WL仓库 - Gitee.com |

相关推荐
字节跳动开源42 分钟前
火山引擎开源 Agent 驱动的搜索自迭代技术
数据库·开源·agent
Oo大司命oO3 小时前
藏在正则表达式里的陷阱
数据库·mysql·正则表达式
_oP_i4 小时前
mysql统计数据库使用存储大小
数据库
会编程的土豆4 小时前
MySQL 入门:库、表、行、主键是什么
linux·数据库·网络协议·http
jjjava2.04 小时前
系统日志:从入门到精通的完整指南
网络·数据库
写代码的强哥4 小时前
云原生数据库与传统数据库相比“新”在哪里
数据库·云原生·架构
吴声子夜歌5 小时前
MongoDB 4.2——查询
数据库·mongodb
xieliyu.7 小时前
MySQL 存储过程详解:概念、创建与删除全教程
开发语言·数据库·mysql
ttwuai7 小时前
AI 生成后台删除按钮后,MySQL 软删除和唯一索引怎么验
数据库·mysql·golang