Question Locked

sql query

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi All,

I want to display records form Table1 but only those records form Table1 must not be present in table 2

2 replies

by john.a.wills

Still, what about this?
SELECT x, y, z, key
FROM table1
WHERE NOT EXISTS (SELECT *
FROM table2
WHERE table2.key = table1.key)

This discussion is closed to new replies.