Can I make an update using common table expression in oracle database?
I am getting error
ORA-00928: missing SELECT keyword
with average as (SELECT avg(salary) FROM instructor)
set salary = case
when salary <= average salary * 1.05
else salary * 1.03
average salary just a scalar value you can do
update instructor set salary = case when salary <= (select avg(t.salary) from instructor t) * 1.05 else salary * 1.03 end
In that case Oracle first compute the average (say
1234.4567) and then perform the update.