How can i insert data inro a table with 3 columns using
FORALL?
Answers were Sorted based on User's Feedback
Answer / ashutosh
you can use 3 different collections for it...
suppose the table is emp have the following columns
1. empname varchar
2. empid number
3. sal number
declare
type name_typ is table of emp.empname%type;
type id_typ is table of emp.empid%type;
type sal_typ is table of emp.sal%type;
name_tab name_typ;
id_tab id_typ;
sal_tab sal_typ;
begin
name_tab := name_typ('ramit','rohan');
id_tab := id_typ(10,20);
sal_tab := sal_typ(21000,22000);
for all i in name_tab.first .. name_tab.last
insert into emp values(name_tab(i),id_tab(i),sal_tab(i));
end;
Is This Answer Correct ? | 39 Yes | 1 No |
Answer / amarnath
in stead of above discription we need to use dynamic sql.
Is This Answer Correct ? | 6 Yes | 2 No |
Write a pl/sql script to display the following series of numbers: 99,96,93……9,6,3?
What will you get by the cursor attribute sql%rowcount?
What kind of join is join?
What is schema in sql example?
Does normalization improve performance?
Differentiate between pl/sql and sql?
what are all different types of collation sensitivity? : Sql dba
What is partition by in sql?
What is secondary key?
Can we use threading in pl/sql?
What are the Restrictions on Cursor Variables?
What is a record in pl/sql?