【正文】
就是存在,則把這行的相關(guān)信息輸出 1: select distinct 姓名 from xs 2: where not exists ( 3: select * from kc 4: where not exists ( 5: select * from xs_kc 6: where 學(xué)號= and 課程號= ) 分析下上面的查詢語句: 把最外層的xs表里的記錄一行一行的同中層一行一的笛卡爾乘積后拿到里面去檢驗(yàn) 在最里層,如果xs_kc表里的某行有拿來檢驗(yàn)的這行的學(xué)號