|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 写出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
相关推荐
十二同学啊4 小时前
向量数据库:从核心原理到 RAG 与 Java 实战蓝速科技5 小时前
会议室门牌公告通知发布选型与落地指南丨蓝速科技一 乐7 小时前
二手交易平台|基于springboot + vue二手交易平台(源码+数据库+文档)SelectDB8 小时前
同等资源下 Apache Doris 4.2 vs StarRocks 4.1.1:1TB SSB 与 TPC-H 性能实测这个DBA有点耶8 小时前
数据库集群与分布式架构:三条技术路线对比、金仓KES RAC实测数据与决策框架MayBaymax8 小时前
MongoDB 索引与事务SelectDB8 小时前
Doris vs ClickHouse:企业 OLAP 走向下一阶段,两种技术路线如何选择vx-程序开发8 小时前
【计算机毕设】django校园跑腿服务系统83141一 乐9 小时前
养老院管理系统|基于springboot + vue养老院管理系统(源码+数据库+文档)这个DBA有点耶10 小时前
InnoDB页结构深入:页分裂、页合并、填充因子——B+树底层机制全解析