Sql server DELETE and WITH clause -


I need to create a SQL statement to delete from a certain statement that matches the second selection statement.

We remove

  in Teratata from Table 1 (col1, col2) (select table2 from col1, col2)  

While more than 1 column is not allowed in the WHERE..IN section in SQL Server, I thought I could use these segments:

  with tempTable ( Col1, col2) (Table 2, select 2 table from col2) with table 1 where table1.col1 = tempTable.col1 and table1.col2 = TempTable.col2  

What kind of use with DELETE section? Is there any other way?

It should do this:

  Delete Table 1 to Table 1 TempTable t2.Col1 = t1.Col1 and t2.Col2 = t1.Col2  
on T1 internal teams

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -