Wednesday, June 15, 2022

Oracle SQL Commands

SQL is divided into 5 types of Sub Languages based on nature of   commands.                                                    

Sub Languages                                                

1.    DDL ( Object Level)                                                     

2.    DML (Data Level)                                                         

3.    DQL or DRL (Selection Level)                                                   

4.    DCL ( Control Level)                                                    

5.    TCL (Transaction Level)                              

DDL (Data Definition Language) commands Advantages:                                                          

1.    DDL commands are useful to create or modify or delete database objects.

2.    Like tables, views, indexes, sequences, synonyms,users, functions,                     

            procedures, triggers, packages and so on..                                          

1.    Create             

2.    Alter                                                    

3.    Drop                                                    

4.    Truncate                                                          

5.    Rename                                                           

DML (Data Manipulation Language)COMMANDS                                                

Used to  enter new data/ changing old data / deleting the data from table.                                                           

1.    Insert                                                        

2.    Update                                                      

3.    Delete                                                       

DRL/DQL (Data Retreival / Query language) Command                                                

            SELECT ( logical command )                                     

DCL (Data Control Language) Commands                                                        

1.Used to control the access of data base objects.                                                        

2.These commands are used by DBA (database administrator)                                                 

1.    Grant                                       

2.    Revoke                                    

   TCL (TRANSACTION CONTROL LANGUAGE)COMMANDS                                                           

Used to save or cancel the actions made on table data.                                                

1.Commit                                                        

2.Rollback                                                       

            3.Savepoint     

No comments:

Post a Comment