If the below mentioned example is your use case, you can try what Segel suggested.

From: Michael Segel [mailto:msegel@segel.com] On Behalf Of derby@segel.com
Sent: Friday, August 07, 2009 6:05 PM
To: 'Derby Discussion'
Subject: RE: SQL Syntax issue

Why do you need two tables in your update?


Its not really a nested query but an Update statement where you use a select statement to help qualify the Update.


See the standard SQL syntax on this.


From: Ravinder Reddy [mailto:ravinder.pandiri@gmail.com]
Sent: Friday, August 07, 2009 7:06 AM
To: Derby Discussion
Subject: Re: SQL Syntax issue




I think , you can't do that.

Instead use nested queries (I am not sure Derby supports nested queries though).



On Fri, Aug 7, 2009 at 5:07 PM, Priyanka Karnawat <priyanka@sungraceinfotech.co.in> wrote:

Can we use 2 or more tables in UPDATE clause?
eg. UPDATE T1, T2
SET T1.name = 'abc'
WHERE T1.id = T2.id

Ravinder Reddy