General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi,
I have 2 tables:
Employee table 2 fields:
EmpID EmpName
11111 JoeBlo
22222 JackWhite
33333 JohnBlack
44444 MaryGreen
55555 MeeLee
66666 SeeLoo
77777 TeeNoo
Idcard table 2 fields:
EmpID ExpireDate
11111 01/31/2013
22222 02/28/2013
33333 03/31/2013
44444 04/30/2013
55555 12/31/2012
Find all employees either without an IDcard or with one that has expired ?
SELECT * FROM Employee WHERE EmpID not IN(SELECT IDCard.EmpID FROM IdCard);
How do I do to have with one that has expired like empID = 55555
Thank you,
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only