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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Deleting records

Author  Topic 

somu_p
Starting Member

13 Posts

Posted - 2007-10-25 : 11:04:30
Hi,
I've two tables with one common field.

I want to delete the records from the two tables using a join in single query.

Kindly help me in this regard

Thanks and regards,
Somu


harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-10-25 : 11:06:07
[code]Delete t1
From Table1 t1 Join Table2 t2
on t1.fld1 = t2.fld1
where <some_condition>[/code]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -