當前位置:首頁 » 操作系統 » 資料庫查詢姓王

資料庫查詢姓王

發布時間: 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

關系資料庫系統至少應當支持三種關系運算,即選擇、投影和連接。選擇是從二維表中選出符合條件的記錄,它是從行的角度對關系進行的運算。投影是從二維表中選出所需要的列,它是從列的角度對關系進行的運算。連接是同時涉及兩個二維表的運算,它是將兩個關系在給定的屬性上滿足給定條件的記錄連接起來而得到的一個新的關系。

熱點內容
楊穎安卓baby什麼時候聖誕節 發布:2025-08-06 03:42:56 瀏覽:39
安卓如何使用電腦的語音 發布:2025-08-06 03:41:29 瀏覽:671
編譯器和解釋器和編譯原理 發布:2025-08-06 03:39:28 瀏覽:497
c編譯器怎麼改成中文版 發布:2025-08-06 03:38:04 瀏覽:741
我的世界別人的伺服器 發布:2025-08-06 03:37:54 瀏覽:2
php存儲圖片上傳 發布:2025-08-06 03:37:18 瀏覽:557
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