Posts

Showing posts from 2019

TCL Command in SQL (Commit, Rollback, Savepoint)

TCL Commands in SQL ---======================================== -- Commit -- ---======================================== select * from XXSD_DEPT insert into XXSD_DEPT VALUES( 1 , 'OPMS1' , 'Phase-1' ) insert into XXSD_DEPT VALUES( 2 , 'OPMS2' , 'Phase-2' ) insert into XXSD_DEPT VALUES( 3 , 'OPMS3' , 'Phase-3' ) COMMIT; delete from XXSD_DEPT where DEPTNO = 2 COMMIT; ---======================================== -- Rollback -- ---======================================== insert into XXSD_DEPT VALUES( 2 , 'OPMS2' , 'Phase-2' ) insert into XXSD_DEPT VALUES( 4 , 'OPMS4' , 'Phase-4' ) insert into XXSD_DEPT VALUES( 5 , 'OPMS5' , 'Phase-5' ) select * from XXSD_DEPT ROLLBACK; delete from XXSD_DEPT where DEPTNO = 2 Understand SAVEPOINT select * from XXSD_DEPT ---===========...

DCL Command in SQL (Grant, Revoke)

DCL Command in SQL:- select * from XXSD_DEPT DESC XXSD_DEPT --==================================================== SYNONYM --==================================================== CREATE SYNONYM XXSD . XXSD_DEPT FOR APPS . XXSD_DEPT DROP SYNONYM XXSD . XXSD_DEPT desc XXSD_DEPT --GRANT-- --==================================================== SELECT GRANT --==================================================== GRANT SELECT ON XXSD_DEPT TO XXSD --==================================================== INSERT GRANT --==================================================== GRANT INSERT ON XXSD_DEPT TO XXSD --==================================================== UPDATE GRANT --==================================================== GRANT UPDATE ON XXSD_DEPT TO XXSD --==================================================== DELETE GRANT --==================================================== GRANT DELETE ...