I am using SQL Server 2000
Table1
ID Date
001 23/02/2009
001 24/02/2009
002 25/02/2009
....
Table2
ID Date
001 23/02/2009
002 25/02/2009
Query Like
Delete from table1 where table1.id = table2.id and table1.date = table2.date
How to make a Query for the above condition
delete table1makestable1the target for deletion. You could writedelete from table1butfromis optional.from table2specifies the source for deletion. To use a “second” from clause is a t-sql extension that is used to match corresponding rows.Finally the where clause joins the tables on columns
idanddatecausing the matching rows intable1to be deleted.