MySQL语句练习题

2select * from employee where age>20;
3写出sql语句,查询所有年龄大于等于22小于25的女性员工
4select * from employee where age between 22 and 25 and sex='女';
5写出sql语句,统计男女员工各有多少名
6select Sex,count(*) as count from employee group by Sex;
7写出sql语句,按照年龄降序获取员工信息
8select * from emloyee where age index;
9写出sql语句,获取员工中哪个姓名具有重名现象
10select Name,count(*) as count from employee group by Name having count>1;
11写出sql语句,查询所有姓张的员工
12select * from employee where Name like '张%';
13写出sql语句,查询住址为北京的前3条记录
14select * from employee where Address='北京' limit 3;
15写出sql语句,查询员工总数
16select count(*) from employee;
17写出sql语句,向表中插入一条记录
18insert into employee
19values("周一",“男”,“25”,“张家口”);
20写出sql语句,修改员工张四的住址为南京
21update employee set Address='南京' where Name='张四';
22写出sql语句,删除年龄大于24岁的女员工
23delete from employee where Sex='女' and Age>24;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值