Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Multiple updates w. static SQL vs. single dynamic SQL update
Hi,
What would be better (faster):
1.have a stored procedure loop thru a list of values and execute a statement:
update customers set active = 1 where customer_code = value
2. create a comma delimited string of values like so:
list := value1 || ',' || value2 || ',' || value3....
and using it in a dynamic SQL like so:
v_sql = 'update customers set active = 1 where customer_code in ( ' || list || ')'
Thanks. Received on Fri Jul 07 2006 - 17:07:33 CDT