SQL Interview Questions – SQL Basic Questions
1: [Asked in TCS] What is SQL, and why is it used?
SQL (Structured Query Language) is used to store, manipulate, and retrieve data from relational databases. It allows users to perform operations like INSERT, UPDATE, DELETE, and SELECT.
2: [Asked in Infosys] What are the different types of SQL statements?
SQL statements are categorized as:
- DDL (Data Definition Language): CREATE, ALTER, DROP
- DML (Data Manipulation Language): INSERT, UPDATE, DELETE
- DCL (Data Control Language): GRANT, REVOKE
- TCL (Transaction Control Language): COMMIT, ROLLBACK
3: [Asked in Wipro] What is the difference between SQL and MySQL?
SQL is a language used to interact with databases, while MySQL is a database management system (DBMS) that uses SQL.
