How to use UPDATE command in SQL




--====================================================
DML - UPDATE
--====================================================

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

select * from XX_EMP_TL

DESC XX_EMP_TL

UPDATE XX_EMP_TL
SET EMP_GRADE = 'M'
WHERE  EMP_ID = 100

COMMIT;

ROLLBACK;


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

select * from XX_EMP_TL

DESC XX_EMP_TL

UPDATE XX_EMP_TL
SET EMP_GRADE = 'M',
EMP_NAME = EMP_NAME||'- A'
WHERE  EMP_ID >= 100

COMMIT;

ROLLBACK;


--======
3.
--======

select * from XX_EMP_TL

UPDATE XX_EMP_TL
SET EMP_GRADE = 'L'

COMMIT;

ROLLBACK;

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