Oracle / PLSQL: INSERT STATEMENT


Oracle / PLSQL: INSERT STATEMENT:  

   The oracle INSERT statement is used to insert a single record or multiple records into table.

Syntax for INSERT:

For single record:-
INSERT INTO Table_name ( Column1, Column2,…. ) VALUES (expression1, expression2,……..);
For Multiple records:-  
INSERT ALL
INTO Table_name ( Column1, Column2,…. ) VALUES (expression1, expression2,……..);
INTO Table_name ( Column1, Column2,…. ) VALUES (expression1, expression2,……..);
Example for Insert Multiple rows:
In below example we insert two rows in emp1 table in Oracle, Using a oracle INSERT statement
 Insert all into emp1(ename, eid, doj, esal) values('a6',6,'02-02-2015',9000)
                    into emp1(ename, eid, doj, esal) values('a5',5,'02-02-2015',9000) 
select * from emp1;



Comments