469,127 Members | 1,349 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,127 developers. It's quick & easy.

missing set keyword

update em123,de123 set em123.sal=sal+17000,de123.dname='manager' where em123.eno=de123.eno
Nov 23 '11 #1
1 1281
700 Expert 512MB
You can not update two tables with one UPDATE query.
You have to split query into two queries.
Expand|Select|Wrap|Line Numbers
  1. update em123 set em123.sal=sal+17000 where em123.eno in (select eno from de123)
Expand|Select|Wrap|Line Numbers
  1. update de123 set de123.dname='manager' where de123.eno in (select eno from eml23);
If tables are rather big you can use EXISTS instead of IN
Nov 23 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

24 posts views Thread by brian.bird | last post: by
7 posts views Thread by Corepaul | last post: by
5 posts views Thread by Mark Broadbent | last post: by
4 posts views Thread by Elad Gutman | last post: by
1 post views Thread by Maheshkumar.R | last post: by
33 posts views Thread by Snis Pilbor | last post: by
8 posts views Thread by Steven D'Aprano | last post: by
17 posts views Thread by Christoph Zwerschke | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.