Hi, guys
Is there a way to loop through each column of a table? If there is a way, then how?
I have a table with columns of different datatypes , and I want to set default values for each column with a loop but don't know how to make it happen.
For example,
Table: Employees
declare
rec Employees%ROWTYPE;
begin
for col in rec.empno .. rec.location loop
if col = rec.empno then -- set default value for column empno;
...
end loop;
end;
.
/
Sorry, I am a newbie to PL/SQL. Please help!
Thanks in advance.
Edited by: HappyJay on 2010/05/11 10:36