Friday, October 30, 2009

SQL - A simple example of using IN / NOT IN

Below is a simple example of using IN / NOT IN of SQL2005

select TID, MobileNum, create_timestamp, success from XXX..XXX where TID not like 'ZHA%' and mobilenum not in
( select mobile_num as mobilenum from XXX..XXXX
)
order by create_timestamp asc

No comments: