Lets create a table first
create table test ( id number, name varchar2(20) );
Now during insert, i wanna hold the data into variable first & then dynamically pass the variable into the VALUES clause.
declare v_data varchar2(50); begin v_data:='1,sunny'; execute immediate 'insert into test values(v_data)'; commit; end;
But its showing some errors(Not enough values)...... plz help how to achieve this??