I came across this code while searching through the "Oracle 10g Complete Reference" by Kevin Loney. It provides a much faster approach to finding out records that belonging to one table and not to an other.
So the query:select TITLE from BOOKSHELF where TITLE not in (Select TITLE from BOOKSHELF_CHECKOUT) order by TITLE;can be replaced by
select distinct B.TITLE from BOOKSHELF_CHECKOUT BC right outer join BOOKSHELF B on BC.TITLE = B.TITLE where BC.TITLE = NULL order by TITLE;
No comments:
Post a Comment
I have had so many good people trying to promote various community oriented sites through here. Therefore all comments will first have to come through me... so I get a chance to learn about the interesting sites before you do ...