午夜精品久久久久久久99老熟妇,天堂中文www官网,未满十八18勿进黄网站,太粗太深了太紧太爽了,天天爽夜夜爽夜夜爽

考試報名
考試報名
考試內(nèi)容
考試大綱
在線客服
返回頂部

備考刷題,請到

CDA認(rèn)證小程序

Given student(sid, sname, sex, age), course(cid, cname, teacher), sc(sid, cid, grade). To find students who did not take exams, the correct statement is:
A. select sname from student where sid in (select sid from sc);
B. select sname from student where sid not in (select sid from sc);
C. select sname from student;
D. select sid from sc;
上一題
下一題
收藏
點(diǎn)贊
評論
題目解析
題目評論(0)

First, query student ids who took exams from table sc: select sid from sc; Then as the second step, filter for ids not in the result of step 1 in the student table, to find students who did not take exams. So it first retrieves student ids who took exams from table sc, and uses that as a subquery condition to filter for ids not in that result set, in order to find students who did not take any exams.

正確答案是:B: select sname from student where sid not in (select sid from sc);

專業(yè)分析如下:

題目要求找出沒有參加考試的學(xué)生。我們需要從 `student` 表中篩選出那些沒有在 `sc` 表中出現(xiàn)過的學(xué)生(即沒有記錄的學(xué)生)。

首先,我們來分析各個選項(xiàng):
- A: `select sname from student where sid in (select sid from sc);`
- 這個查詢語句的意思是:從 `student` 表中選出那些在 `sc` 表中出現(xiàn)過的學(xué)生。這與題目的要求正好相反,因?yàn)樗业氖菂⒓恿丝荚嚨膶W(xué)生。

- B: `select sname from student where sid not in (select sid from sc);`
- 這個查詢語句的意思是:從 `student` 表中選出那些在 `sc` 表中沒有出現(xiàn)過的學(xué)生。這正好符合題目的要求,找出沒有參加考試的學(xué)生。

- C: `select sname from student;`
- 這個查詢語句的意思是:從 `student` 表中選出所有學(xué)生。這并沒有篩選出沒有參加考試的學(xué)生,所以不符合題目的要求。

- D: `select sid from sc;`
- 這個查詢語句的意思是:從 `sc` 表中選出所有學(xué)生的學(xué)號。這只是列出了參加考試的學(xué)生學(xué)號,并沒有篩選出沒有參加考試的學(xué)生,也不符合題目的要求。

綜上所述,正確答案是 B。