✅ SQL / MySQL (DBMS) Important Questions – PYQ Style


🔹 Section 1: Basic Concepts (Theory)

  1. What is DBMS? Explain its advantages.

  2. What is RDBMS? Difference between DBMS and RDBMS.

  3. What is SQL? Explain its types.

  4. Explain different data types in MySQL.

  5. What is a Primary Key?

  6. What is a Foreign Key?

  7. Difference between Candidate Key and Primary Key.

  8. Difference between Unique Key and Primary Key.

  9. What are Constraints? Explain types.

  10. What is Normalization? Explain 1NF, 2NF, 3NF.


🔹 Section 2: SQL Commands

⭐ DDL (Data Definition Language)

  1. Explain CREATE TABLE syntax.

  2. What is ALTER TABLE?

  3. Difference between DROP, DELETE, and TRUNCATE.

  4. How to add a column in an existing table?

  5. How to rename a table?


⭐ DML (Data Manipulation Language)

  1. INSERT statement syntax.

  2. UPDATE statement with example.

  3. DELETE statement with example.

  4. Explain SELECT statement.


🔹 Section 3: Query-Based Questions (Most Important)

Example Table:

Student(id, name, marks, city)


Basic Queries

  1. Display all records from Student.

  2. Display only name column.

  3. Show students with marks > 60.

  4. Show students from city = 'Delhi'.

  5. Show marks between 50 and 80.


Aggregate Functions

  1. Count total students.

  2. Find maximum marks.

  3. Find minimum marks.

  4. Find average marks.

  5. Find sum of marks.


GROUP BY

  1. Count students city-wise.

  2. Find average marks city-wise.


ORDER BY

  1. Sort marks in descending order.

  2. Sort names in ascending order.


LIKE Operator

  1. Names starting with 'A'.

  2. Names ending with 'n'.

  3. Names containing 'ra'.


🔹 Section 4: JOINs (Very Frequently Asked ⭐)

  1. What is JOIN? Explain types.

  2. Write query for INNER JOIN.

  3. Write query for LEFT JOIN.

  4. Write query for RIGHT JOIN.

  5. What is Self Join?


🔹 Section 5: Subqueries

  1. Find student with highest marks.

  2. Find students having marks greater than average.


🔹 Section 6: Constraints Practical

  1. Create table with Primary Key.

  2. Use NOT NULL constraint.

  3. Set DEFAULT value.

  4. Use CHECK constraint.


🔹 Section 7: Index, View & Advanced

  1. What is Index? Advantages.

  2. What is View? Syntax to create view.

  3. Advantages of View.

  4. What is Stored Procedure?

  5. What is Trigger?


🔹 Section 8: MySQL Specific

  1. What is MySQL?

  2. How to create a database?

  3. How to delete a database?

  4. SHOW DATABASES command.

  5. SHOW TABLES command.

  6. USE database command.

  7. What is AUTO_INCREMENT?

  8. Explain LIMIT clause.


🔹 Section 9: Long/Descriptive Questions

  1. Draw ER diagram.

  2. Explain normalization with example.

  3. Explain ACID properties.

  4. What is Transaction? Explain COMMIT and ROLLOBACK.

  5. Difference between SQL and NoSQL.

  6. Clustered vs Non-clustered Index.

  7. Function vs Procedure difference.

  8. What is Deadlock?

  9. Backup and Recovery methods.

  10. Explain 3-tier architecture of DBMS.

Last modified: Wednesday, 4 February 2026, 1:18 AM