当前位置:首页 » 操作系统 » 数据库查询姓王

数据库查询姓王

发布时间: 2025-08-02 12:33:29

⑴ 请教这个sql查询like语句怎么写我要查询姓王

用以“王”字开头做like模糊查询就可以了。例如:
select * from students where sName like '王%';
请留意不同的数据库所使用的通配符是不一样的,例如access数据库默认语法上述语句要改为如下:
select * from students where sName like '王*';

⑵ 查询全体学生的姓名及其出生年份 (数据库)

1: select name , age from student;

2: select major_num from student where major = '计算机专业';

3: select * from student where age >19;

4: select name , ID from stent where major = '...';

5: select name , age from student where sex = '男' or age >19

6: select name , ID , sex from student where name like '王%'

7: select name , ID , sex from student where name NOT like '王%'

8: select name , ID , sex from student where name NOT like '_佳%'

9: select name , age ,major where age like [18-25]

10: select name , age ,major where age NOT like [18-25]

11: select * from student where name = (select major from student
where name = '王涛')

12: select ID,name from student where major_id = 001

13: select ID,name from student where major_id <> 001

14: select * from student where zhuanyechengji > 80

15: select ID,score from student where major_id = 001
Order by score DESC

16: select * from student order by age DESC ,major

17:

18: select count(*) from student

19: select count(*) from student where EXISTS (select scroe from

student)

20:

21:

22:

其他几道没有把握....就不放出来了

⑶ 在学生表,中要查找所有年龄大于30岁姓王的男同学,应该采用的关系运算 是()。

【答案】:A

关系数据库系统至少应当支持三种关系运算,即选择、投影和连接。选择是从二维表中选出符合条件的记录,它是从行的角度对关系进行的运算。投影是从二维表中选出所需要的列,它是从列的角度对关系进行的运算。连接是同时涉及两个二维表的运算,它是将两个关系在给定的属性上满足给定条件的记录连接起来而得到的一个新的关系。

热点内容
java返回this 发布:2025-10-20 08:28:16 浏览:585
制作脚本网站 发布:2025-10-20 08:17:34 浏览:881
python中的init方法 发布:2025-10-20 08:17:33 浏览:574
图案密码什么意思 发布:2025-10-20 08:16:56 浏览:761
怎么清理微信视频缓存 发布:2025-10-20 08:12:37 浏览:677
c语言编译器怎么看执行过程 发布:2025-10-20 08:00:32 浏览:1005
邮箱如何填写发信服务器 发布:2025-10-20 07:45:27 浏览:250
shell脚本入门案例 发布:2025-10-20 07:44:45 浏览:108
怎么上传照片浏览上传 发布:2025-10-20 07:44:03 浏览:799
python股票数据获取 发布:2025-10-20 07:39:44 浏览:705