| Updating table with sequentially changing column name [message #563175] |
Thu, 09 August 2012 05:48  |
 |
Jaise
Messages: 3 Registered: August 2012 Location: India
|
Junior Member |
|
|
Dear All,
I am trying to update all rows of 100 column of a table with '0'. The column name is sequentially increasing one like EMP_1,EMP_2,EMP_3, etc. I tried using the below code but I am getting ora-06550 and ora-00927 error's. Could any one please help in correcting the code
begin
FOR i in 1..100 loop
UPDATE EMP_DETAILS SET EMP_'||i||' =0
END LOOP;
COMMIT;
END;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|