练 习

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

相关推荐
whcyhhh23 分钟前
头歌实践教学平台:大数据存储2023(六)
大数据·数据库·python
Elastic 中国社区官方博客2 小时前
让大模型思考,让小模型执行:在 Elastic Workflows 中拆分 LLM 成本
大数据·运维·数据库·人工智能·elasticsearch·ai
Faith_xzc2 小时前
一条 SQL 顶一条 Flink 链路?Doris Streaming Job 持续导入全景解析
大数据·数据库·sql·flink
爱学习的小白柏2 小时前
【AI问数技术】多Agent协同架构:查询规划/SQL生成/洞察分析/报告生成
java·网络·人工智能·windows·sql·架构·llama
摆烂z3 小时前
简单理解StarRocks
sql
这个DBA有点耶4 小时前
多模数据库深度解读:从“多库拼装”到“一库多能”的架构演进
数据库·mysql·dba
程序员夏洛5 小时前
MySQL 默认的事务隔离级别是什么?为什么选择这个级别?
数据库·mysql
艺术留白5 小时前
MokaTest使用篇-SQL接口
数据库·sql
( •̀∀•́ )9206 小时前
MySQL 自动备份与恢复方案
数据库·mysql·oracle
这个DBA有点耶6 小时前
大事务的“事前预防”:监控、拦截、Kill,四层防线一次讲透
数据库·mysql·代码规范