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 |
Give an example of Full Outer Join?
How to add, remove, modify users using sql?
how many triggers are allowed in mysql table? : Sql dba
What is a left inner join?
What is compute?
How can you tell the difference between an index and a view?
Which one of the following pairs of aggregate functions do you use with character fields? 1. COUNT(field) and MAX(field) 2. AVG(field) and COUNT(field) 3. MIN(field) and SUM(field) 4. AVG(field) and MAX(field) 5. COUNT(field) and SUM(field)
What is a schema sql?
What are advantages of Stored Procedures?
what are the differences between get and post methods in form submitting. Give the case where we can use get and we can use post methods? : Sql dba
Is foreign key mandatory?
How can you load multi line records? : aql loader