查詢全體學生的姓名及其出生年份(資料庫)

2021-07-13 09:09:39 字數 1633 閱讀 4282

1樓:世界大同喵

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 stduent where major = '...';

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

6: select name , id , *** from student where name like '王%'

7: select name , id , *** from student where name not like '王%'

8: select name , id , *** 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:其他幾道沒有把握....就不放出來了

2樓:醉含笑

資料庫結構沒提供出來,誰也做不出來的

如:姓名是用的什麼欄位呀,是name嗎?等等

sql查詢命令實現以下。1.查閱學生表student中學生的學號,姓名和出生日期,結果年齡從大到小

3樓:

--第一題來

select 學號

源bai,姓名,出生du日期zhi from student order by 出生日期

--第二題

select a.學號,a.姓名 from student a inner join score b on a.學號=b.學號

where b.課程編號dao='0101' and b.成績>=90

SQL查詢選修了全部課程的學生姓名

第一問 兩個not exists表示雙重否定 沒有一個選了課的學生沒有選course表裡的課程 select sname from student where not exists 沒有一個學生滿足以下條件 select from course where not exists 什麼條件呢?沒有選過...

5用SQL命令查詢所有學生的學號 姓名 總成績 平均成績

你的表是 來什麼名?表源 裡有哪些欄位?假如你的學bai生表是dustudent,學號的欄位名是 學號 姓zhi名dao的欄位名是 姓名 成績的欄位名是 成績 那麼查詢所有學生的學號就是 select 學號,姓名,evg 成績 sum 成績 from student 應該就是這樣的了你執行一下試試 ...

SQL 查詢每門課程的課程名 選課學生姓名及其學號,選課人數

我的學生資料庫跟你的差不多,我就用我的這些表給你做了個 select c.o,s.sname,s.sno,選課人數 from course c left join sc on c.o sc.o left join student s on s.sno sc.sno left join select ...