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

数据库查询姓王

发布时间: 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

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

热点内容
c编译器怎么改成中文版 发布:2025-08-06 03:38:04 浏览:740
我的世界别人的服务器 发布:2025-08-06 03:37:54 浏览:1
php存储图片上传 发布:2025-08-06 03:37:18 浏览:556
oracle存储过程时间 发布:2025-08-06 03:10:49 浏览:164
linux命令在哪 发布:2025-08-06 03:10:19 浏览:662
如何下载安卓版街霸5 发布:2025-08-06 03:01:20 浏览:403
名爵3存储卡怎么放车上 发布:2025-08-06 02:57:08 浏览:184
访问瑞士 发布:2025-08-06 02:38:44 浏览:128
搭路服务器怎么建 发布:2025-08-06 02:19:16 浏览:456
ram中存储的数据在断电后丢失 发布:2025-08-06 02:17:34 浏览:418