练 习

|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 写出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 |

相关推荐
一氧化二氢.h22 分钟前
MySQL root用户连接错误解决方法
android·数据库·mysql
q***239236 分钟前
数据库操作与数据管理——Rust 与 SQLite 的集成
数据库·rust·sqlite
q***333740 分钟前
给SQL server数据库表字段添加注释SQL,附修改、删除注释SQL及演示
数据库·sql·oracle
百***22121 小时前
mysql 迁移达梦数据库出现的 sql 语法问题 以及迁移方案
数据库·sql·mysql
_Jimmy_1 小时前
ShardingSphere-JDBC 实现两个mysql数据库的不同表的关联查询
数据库·mysql
weixin_307779131 小时前
基于AWS的应用程序可靠性提升架构优化方案——RDS多可用区与EC2弹性架构实践
数据库·数据仓库·架构·云计算·aws
Chan161 小时前
【 Java八股文面试 | Redis篇 缓存问题、持久化、分布式锁 】
java·数据库·redis·后端·spring·缓存·面试
G***T6912 小时前
PostgreSQL全文搜索教程,中文分词配置
数据库·postgresql·中文分词
必胜刻2 小时前
MySQL复盘总结
数据库·mysql·oracle
百***79462 小时前
MySQL数据库(SQL分类)
数据库·sql·mysql