We will use basic DML Command to insert the values into Oracle tables.
“Insert into” Command will be used to insert the values in the Oracle table, but basically, it will accept insertion for only one table.
“Multiple Table Insert” Concept was introduced from Oracle 9i. I tried the Multiple Table Insert in Single Query in Oracle 9i and above
Basic Syntax
Insert Into Values (Values of the column present in the Table);
Example
Insert into T1 values (5,’Data’);
Multiple Table insert Introduced from Oracle 9i and above.
Syntax for Multiple Table Insert
Insert ALL
Into Values
Into Values
Select from ;
Example Multiple Table Insert
Insert All
Into T1 values (Empid, Sal)
Into T2 Values (Empid, DOJ)
Select Eid Empid ,Amt Sal, Date DOJ
from Emp
Where Eid = 1000;
The above query will fetch the Records belongs to Eid 1000 from EMP and insert into T1 and T2 Table in the corresponding Columns
|
| Author: Prasad 18 May 2008 | Member Level: Gold Points : 2 |
Thanks for useful information
|