9 replies
by sparent
In Oracle, I would do the following:
SELECT col1, col2, ..., coln
FROM table1
MINUS
SELECT col1, col2, ..., coln
FROM table1
Hopefully, SQL Server has the MINUS set operator, though it may be called differently!
And, no, MINUS is not the opposite of UNION!
by raffi_
I think you are looking for a NOT IN sub-query:
USE pubs
SELECT pub_name
FROM publishers
WHERE pub_id NOT IN
(SELECT pub_id
FROM titles
WHERE type = 'business')
Should work in both Oracle and MS SQL
Regards
Raffi_
by jay eckles
by rsv
HI,
Try this....
SELECT * FROM authors WHERE NOT EXISTS
(SELECT * FROM publishers WHERE
authors.city = publishers.city)
Hope this helps you.
Good Luck...:)
This discussion is closed to new replies.
Trending Desktop posts
Sort by Trending