看板 Database 關於我們 聯絡資訊
找出參與五號部門所管理的的全部計畫的員工姓名 select lname fname from employee where not exists (select* from works_on B where(B.pno in (select pnumber from project where dnum=5) and not exists(select* from works_on c where c.Essn-Ssn and c.pno=b.pno))) 題目在陳玄玲聖經本5-8頁 其中 c.pno=b.pno c 與 b 不是一樣的表格嗎 做這有何意義嗎 還是那個b.pno 是 B.pno in (select pnumber from project where dnum=5) 的b.pno 又 兩個not exists 可以同時替換成 exists 嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 36.224.113.128 ※ 編輯: badbadook 來自: 36.224.113.128 (08/01 16:41)
lbeeon:邏輯判斷順序不影響 08/01 20:27
badbadook:大大可以說的詳細點嗎 偶的問題點還是不懂 08/02 10:25
lbeeon:你題目沒打錯嗎? works_on c 和 c.Essn-Ssn這兩句怪怪 08/02 14:00
TeemingVoid:1. 您的 select 句子明顯有打字錯誤(第一行就錯了)。 08/02 14:27
TeemingVoid:2. 雖然是名著,但是並非每個人手邊都正好該書該版。 08/02 14:28
TeemingVoid:3. 沒有資料表各欄位說明,大家會猜得很累。 08/02 14:28
TeemingVoid:4. 陳老師人很好的,要不要寫信請教本人看看? :-) 08/02 14:28