List out some different SQL statements that can be used for database testing?
DDL- Data Definition Language:
- DROP: Used for dropping the objects of database or database itself.
- ALTER: Properties of database objects can be altered.
- CREATE: Used in the creation of databases and their objects like tables, views, etc.
- TRUNCATE: Using this all records from the table can be removed.
- RENAME: Used to rename the database objects.
DML- Data Manipulation Language:
- SELECT: From the database, specific records or data can be selected.
- INSERT: Used to insert new data or records.
- UPDATE: Existing records can be updated using UPDATE.
- DELETE: Existing records can be deleted.
DQL- Data Query Language:
- SELECT: queries fall under this category.
DCL- Data Control Language:
- GRANT: Used in granting the user access permissions.
- DENY: User permissions can be denied using it.
- REVOKE: User access can be removed using it.
TCL-Transaction Control Language:
- COMMIT: Used for writing and storing the changes in the database.
- ROLLBACK: Used to restore the changes to the last commit.
BY Best Interview Question ON 10 Jan 2022