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 |
What is rollback?
why not null constraint showing its constraint type as 'c'
If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????
How is Oracle 10g helpful when compared to oracle 9i and what is grid computing
What packages are available to pl/sql developers?
How will you debug your procedure? If your procedure is around 2000 lines and the expected output is 10 and we get only output 5.So how will you debug it? Somebody pls give the correct answer?
How to get employee name from employee table which is the fiveth highest salary of the table
If 100 tables are there in user_tables.I want to find in which table zero records are there with table name.Is it possible?
What are analytical functions in sql?
What are sql functions? Describe the different types of sql functions?
Why we use pl sql?
What is cursor in pl sql with examples?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)