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 |
|
cplusplus
Aged Yak Warrior
567 Posts |
Posted - 2010-03-25 : 11:17:13
|
| I want to delete rows in table tab_EmailDownloadMaster if the emaildownloadid is not in table tab_EmailFilesInfodelete from tab_EmailDownloadMaster where if emaildownloadid is not in this tab_EmailFilesInfo.join tab_EmailDownloadMaster.emaildownloadid = tab_EmailFilesInfo.emaildownloadidThank you very much for the helpful info. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-25 : 11:20:38
|
| [code]delete from tab_EmailDownloadMaster where not exists (select 1 from tab_EmailFilesInfo where emaildownloadid= tab_EmailDownloadMaster.emaildownloadid )[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
msuneerbabu
Starting Member
6 Posts |
Posted - 2010-03-25 : 11:23:39
|
| try this,delete from tab_EmailDownloadMaster where emaildownloadid not in (Select emaildownloadid from tab_EmailFilesInfo) |
 |
|
|
|
|
|