
June 23rd, 2012, 07:24 PM
|
Registered User
|
|
Join Date: Jun 2012
Posts: 11
Time spent in forums: 1 h 59 m 53 sec
Reputation Power: 0
|
|
Quote:
Originally Posted by lightCGI
I need a select statement and my brain is mush right now
I have two tables
first table has first column as primary and incrimental
so it looks like this
[ U]nameID[/U] Name
1 bob
2 don
second table looks like this
[ U]noteID[/U] nameIDNotes
1 1 Text
2 2 Text
I need to find out which nameID's in the first table were created that do not have a nameID in the second table of notes
simple but ugggg please help 
|
Code:
select nameid
from firsttable
where not exist (select *
from secondtable
where secondtable.nameid=firsttable.nameid
)
|