Quick Interview Reference For SQL Statement Types

SQL(Structured Query Language) is a language used for managing and querying data stored in relational database management system (RDBMS).
Below are SQL commands categorized as per their functionality.

DML - Data Manipulation Language commands:
  • SELECT: Retrieves data from tables
  • INSERT: Create/insert data into tables.
  • UPDATE: Modifies data in tables
  • DELETE: Delete data from a table

DDL - Data Definition Language commands:
  • CREATE: Creates an object in database
  • ALTER: Modifies an existing object.
  • DROP: Deletes an object in the database
  • RENAME: Renaming and object in the database
  • TRUNCATE: Deletes all data from a table

DCL - Data Control Language commands:
  • GRANT: Grant privileges to users or roles
  • REVOKE: Remove privileges from a user or role

TCL - Transaction Control Language commands:
  • COMMIT: Save all changes done during the session
  • ROLLBACK: Rollback or undo the changes done during the session
  • SAVEPOINT: Mark a point within a set of transactions

No comments:

Post a Comment