Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
任何人都可以帮助查询以选择仅输入特定科目而不输入其他科目的学生。假设我只在“Eng.Maths”中说。
STUDENT SUBJECT MARK Vels Eng.Maths 60 Vels Data.Mining 65 Stivel Eng.Maths 55 Stivel Data.Mining 69 Raj Eng.Maths 66
SELECT * FROM Table1 t1 WHERE subject = 'Eng.Maths' AND NOT EXISTS (SELECT NULL FROM Table1 t2 WHERE t1.Student = t2.Student AND t2.Subject <> t1.subject)
SqlFiddle