Advertisement
desdemona

wtf

Jan 29th, 2013
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.33 KB | None | 0 0
  1. 8. Pokaż dane (ident., nazwisko, tytuł) o nauczycielach, którzy uczyli wszystkich studentów.
  2. SELECT TNo, TName, Title
  3.   FROM Teachers
  4.   WHERE NOT EXISTS
  5.    (SELECT *
  6.      FROM Students
  7.      WHERE NOT EXISTS
  8.        (SELECT *
  9.          FROM TS
  10.          WHERE Teachers.TNo = TS.Tno AND
  11.                Students.SNo = TS.SNo));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement