db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: SQL Syntax issue
Date Fri, 07 Aug 2009 13:02:48 GMT
Priyanka Karnawat wrote:
> Can we use 2 or more tables in UPDATE clause?
> eg. UPDATE T1, T2
> SET T1.name = 'abc'
> WHERE T1.id = T2.id
Hi Priyanka,

I'm not sure what you are trying to do, but the following query may help:

update t1
set name ='abc'
where id in ( select id from t2 );

Hope this is useful,
-Rick

Mime
View raw message