-1
UPDATE emply 
SET e_age = e_age + 10 
FROM emply 
JOIN department ON emply.e_dept = department.d_dpt;
  • Welcome to StackOverflow: if you post code, XML or data samples, **please** highlight those lines in the text editor and click on the "code samples" button ( `{ }` ) on the editor toolbar to nicely format and syntax highlight it! – marc_s Nov 13 '19 at 04:42

1 Answers1

1

You appear to be using SQL Server update join syntax, which won't work on Oracle. One working solution might use a correlated subquery:

UPDATE emply e
SET e_age = e_age + 10
WHERE EXISTS (SELECT 1 FROM department d WHERE d.d_dpt = e.e_dept);
Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360