Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
iboumiza
Starting Member
9 Posts |
Posted - 2011-08-16 : 09:26:48
|
Hi,what I need to do is: 1- Table 1 is old and contains some no longer existing clients name 2- Table 2 is new and do not contain non existing clients names How do I design the query in a way the code look in table 2 and remove from table 1 the no longer existing clients, please ? Thanks |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-08-17 : 02:19:58
|
delete t1from table1 as t1left join table2 as t2 on t1.id = t2.idwhere t2.id is null No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
|
|
|