|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 写出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 |
练 习
qq我爱学习2023-11-30 11:31
相关推荐
茉莉玫瑰花茶1 小时前
综合案例 - AI 智能租房助手 [ 5 ]ywl4708120872 小时前
jwt生产token,简单版helloworld器灵科技2 小时前
AI视频工具实测:Seedance/可灵/HappyHorse谁最能打?摇滚侠2 小时前
MyBatis 入门到项目实战 特殊 SQL 的执行 34-37huangdong_2 小时前
京东商品图片视频批量下载与m3u8视频合并技术完整实现方案倒流时光三十年2 小时前
PostgreSQL CASE 条件表达式详解字节跳动数据平台3 小时前
营销视频进入工业化时代,火山引擎多模态数据湖如何助力多米实现内容生产提效 100+ 倍layflat_coder3 小时前
NL2SQL 正确率怎么提升:ChatBI 的 `<error-msg>` 错误反馈闭环健康平安的活着3 小时前
mysql中数据库脚本太大,通过脚本命令修改db名称倒流时光三十年3 小时前
PostgreSQL COALESCE 条件表达式函数详解