How to use INSERT command in SQL




--====================================================
DML - INSERT
--====================================================

Create Table XX_EMP_TL
(
EMP_ID  NUMBER,
EMP_NAME VARCHAR2(100),
EMP_DOB  DATE,
EMP_GRADE  CHAR
)


select * from XX_EMP_TL

DESC XX_EMP_TL


select * from XX_EMP_TL

--=====
1:-
--=====

INSERT INTO XX_EMP_TL VALUES ( '100','SANJAY KUMAR','1-FEB-1980','L')

select * from XX_EMP_TL

COMMIT;

ROLLBACK;


--=====
2:-
--=====

select * from XX_EMP_TL


INSERT INTO XX_EMP_TL ( EMP_NAME, EMP_DOB) VALUES ( 'SANJAY KUMAR','1-FEB-1980')



--=====
3:-
--=====

select * from XX_EMP_TL

commit;

desc XX_EMP_TL

INSERT INTO XX_EMP_TL
SELECT 103,'AMIT','1-JAN-1980', 'L' FROM DUAL


--=====
4:-
--=====



INSERT INTO XX_EMP_TL (EMP_NAME, EMP_DOB  )
SELECT 'LATA','1-JAN-1980' FROM DUAL




Comments

Popular posts from this blog

E-Text Report In Fusion | Types of E-Text reports

Supplier API's

How to pass default Parameter in cursor