|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 写出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
相关推荐
Moshow郑锴1 小时前
sql-pipeline - 基于PostgreSQL的SQL健康检查与发布编排平台Elastic 中国社区官方博客9 小时前
将你自己的密钥用于现有 Elastic Cloud 部署红海云9 小时前
Jev:给智能系统做判断的模型wjkjpcba9 小时前
PCBA烧录程序是什么:PCBA包工包料厂家解析烧录与测试꯭自꯭闭꯭10 小时前
达梦事物特性及MVCC小马同学-10 小时前
MySQL主从复制和读写分离谢亮_vipxieliang10 小时前
Spring 事务失效的常见场景geovindu11 小时前
sql: JSON and XML Data Handling in SQL using sql server 2025IT大白鼠11 小时前
图数据库系列 · 第 02 篇——架构拆解:原生图存储到因果集群EatFan12 小时前
从“框架混战“到“运行时收敛“:2026 年 AI Agent 开发框架的三条路线之争