Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

difference between regular update and update with execute immediate

588400Apr 22 2009 — edited Apr 23 2009
Hi everyone, I have seen some code where developers have executed insert and update statement using execute immediate.

for example :

execute immediate ('Update employees set employee_salary = :x');

I can update record using the following statement where x is a number (salary)

update employee
set employee_salary = x;

It works fine as well

Whats the difference? and what way is recommended

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 21 2009
Added on Apr 22 2009
15 comments
951 views