Re: Can you specify multiple tables in update's where clause?

From: ssoni <member_at_dbforums.com>
Date: Mon, 16 Jul 2001 18:05:51 GMT
Message-ID: <32G47.10371$rK3.840232_at_news1.onlynews.com>


[Quoted] Actually, he specifically wanted a join UPDATE, not a subquery. This doesn't require any hardcoding of values in the SQL... Not sure this is valid in ORCL....it is in SYBASE

For example: update accts set a2.account_name = a1.account_name from accounts a1, accts a2 where a1.acct_id = a2.acct_id


[Quoted] Originally posted by Hans Noordhof Try this

update table_a set table_a.my_col = 'Like This' where table_a.col_a in (select table_x.col_b from table_x , table_y where table_x.col_x= table_y.col_d ) And buy an SQL-book.

--
Posted via dBforums, http://dbforums.com
Received on Mon Jul 16 2001 - 20:05:51 CEST

Original text of this message