Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 07 Feb 2007 @ 23:17:34 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Delete and update with join
 
From:   Anomy Anom

<-- Anonymously Posted: Wednesday, February 07, 2007 17:32 -->

There are examples in DML portion of SQL reference manual.

Example of update with join of muliple tables

     Update a
     >From table1 a, table2 b
     Set a.column1=b.columnx
     Where a.indexcolumn=b.indexcolumn
     ;

You can only delete from one table at a time so I am not sure what you mean by join of multiple tables in delete statement. May be the following is what you are looking for?

Example:

     Delete from table1
     Where column1 in
     (select columnx
     >From table2)
     ;

Hope this helps.



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023