By Aditi Mishra ยท
SQL Questions Class 12 CBSE 2026 | Informatics Practices, Computerized Accounting, Commerce
Learn important SQL questions for Class 12 CBSE Informatics Practices, Entrepreneurship, and Computerized Accounting. Get solved queries, examples, and exam tips to score high marks.

SQL Questions for Class 12 CBSE (Commerce Stream)
Introduction
SQL (Structured Query Language) is an important topic in Class 12 Informatics Practices and Computerized Accounting. CBSE often asks SQL queries in theory exams and practical viva, so students must practice common questions to score good marks.
This article covers important SQL questions, examples, tables, and exam tips for Class 12 Commerce students.
What is SQL? (Class 12 Simple Definition)
SQL is a language used to store, retrieve, update, and delete data from databases.
It is widely used in banks, companies, schools, and online businesses.
Important SQL Commands for Class 12
| Command | Use |
|---|---|
| SELECT | Retrieve data |
| INSERT | Add new data |
| UPDATE | Modify data |
| DELETE | Remove data |
| CREATE | Create tables |
| DROP | Delete tables |
| ALTER | Modify table structure |
Important SQL Questions for Class 12 CBSE
1. Basic SQL Queries
Q1. Write a query to display all records from STUDENT table.
SELECT * FROM STUDENT;
Q2. Write a query to display only student names.
SELECT Name FROM STUDENT;
2. SQL WHERE Clause Questions
Q3. Display students with marks greater than 80.
SELECT * FROM STUDENT WHERE Marks > 80;
Q4. Display students from Delhi.
SELECT * FROM STUDENT WHERE City = 'Delhi';
3. SQL ORDER BY Questions
Q5. Display students in ascending order of marks.
SELECT * FROM STUDENT ORDER BY Marks ASC;
Q6. Display students in descending order of age.
SELECT * FROM STUDENT ORDER BY Age DESC;
4. SQL INSERT, UPDATE, DELETE Questions
Q7. Insert a new student record.
INSERT INTO STUDENT VALUES (101, 'Rahul', 18, 'Delhi', 85);
Q8. Update marks of Rahul to 90.
UPDATE STUDENT SET Marks = 90 WHERE Name = 'Rahul';
Q9. Delete student record with Roll No 101.
DELETE FROM STUDENT WHERE RollNo = 101;
5. Aggregate Function Questions
| Function | Use |
|---|---|
| COUNT() | Count records |
| SUM() | Total |
| AVG() | Average |
| MAX() | Highest value |
| MIN() | Lowest value |
Q10. Find total number of students.
SELECT COUNT(*) FROM STUDENT;
Q11. Find average marks of students.
SELECT AVG(Marks) FROM STUDENT;
SQL Questions for Computerized Accounting (Commerce Focus)
Sample Accounting Table: ACCOUNT
| AccNo | Name | Balance | City |
|---|---|---|---|
| 101 | Amit | 5000 | Delhi |
| 102 | Neha | 8000 | Mumbai |
Q12. Display accounts with balance above 6000.
SELECT * FROM ACCOUNT WHERE Balance > 6000;
Q13. Update balance of Amit to 7000.
UPDATE ACCOUNT SET Balance = 7000 WHERE Name = 'Amit';
High-Weightage SQL Topics for CBSE Exams
These topics are very important for Class 12 CBSE:
-
SELECT, WHERE, ORDER BY
-
INSERT, UPDATE, DELETE
-
Aggregate functions (COUNT, SUM, AVG)
-
Data types (INT, VARCHAR, DATE)
-
Primary Key and Constraints
-
Simple table creation queries
Sample SQL Viva Questions Class 12
| Question | Answer (Short) |
|---|---|
| What is SQL? | Database query language |
| What is DBMS? | Database Management System |
| Difference between DELETE and DROP? | DELETE removes rows, DROP deletes table |
| What is Primary Key? | Unique identifier |
| What is SELECT command? | Used to fetch data |
Tips to Score Full Marks in SQL (Class 12)
-
Practice writing queries daily
-
Learn SQL syntax by heart
-
Understand table structure questions
-
Practice case-based questions
-
Write queries neatly in exam
-
Revise high-weightage SQL commands
Conclusion
SQL is one of the easiest scoring topics in Class 12 Informatics Practices and Computerized Accounting. By practicing basic queries, commands, and viva questions, students can easily score full marks in CBSE exams. Regular practice and understanding of database concepts will help students in future courses like B.Com, BCA, BBA, and MBA.
Click here to read about Informatics Practices Project Topics Class 12 CBSE 2026 | Entrepreneurship & Computerized Accounting: https://dekhocampus.com/news/informatics-practices-project-topics-class-12-cbse-2026