September 14, 2024
Overview: Master the art of database management in CBSE Class 12 Computer Science with these potential CBSE Class 12 Computer Science SQL Questions. Enhance your SQL skills and ensure you're ready for the exam!
Structured Query Language (SQLis a crucial part of the CBSE Class 12 Computer Science curriculum. It allows one to interact with and manipulate databases.
With a blend of theoretical understanding and practical application, mastering SQL can be a breeze.
Practising CBSE Class 12 Computer Science SQL Questions can help you prepare for the exam. Discover sample questions for the CBSE Class 12 Computer Science SQL section.
The CBSE Class 12 Board 2024 computer science exam will be worth 100 marks, with 70 marks awarded for theory and 30 marks allotted for practical.
The theoretical exam consists of three units, while the practical exam consists of a lab test, report file, project, and viva. The course will cover Computational Thinking and Programming, Computer Networks, and Database Management.
Students may also take the CBSE Class 12 Computer Science Previous Year Question papers to get a feel for the degree of difficulty and sorts of questions asked in the CBSE Class 12 Computer Science SQL exam.
Here's how to prepare for CBSE Class 12 Computer Science SQL questions -
Several websites offer CBSE class 12 computer science SQL questions in PDF format. Ensure you download these class 12 SQL questions with answers in PDF and start practising them.
Check Out: CBSE Class 12 Computer Science Important Question with Solutions
For these sample CBSE Class 12 Computer Science SQL questions, we'll use a table named STUDENTS with columns RollNo, Name, Class, and Marks.
Q1. Create a table named STUDENTS with specified columns and data types.
CREATE TABLE STUDENTS (
RollNo INT PRIMARY KEY,
Name VARCHAR(50),
Class CHAR(2),
Marks INT
);
Q2. Insert 5 records into the STUDENTS table.
INSERT INTO STUDENTS (RollNo, Name, Class, Marks)
VALUES
(1, 'Alice', '12', 90),
(2, 'Bob', '11', 85),
(3, 'Charlie', '12', 75),
(4, 'David', '11', 92),
(5, 'Emily', '12', 88);
Check Out: CBSE Class 12 Computer Science Practical Viva Questions
Q3. Display all records from the STUDENTS table.
SELECT * FROM STUDENTS;
Q4. Display the names and marks of students in class 12.
SELECT Name, Marks FROM STUDENTS WHERE Class = '12';
Check Out: CBSE Class 12 Computer Science Syllabus
Q5. Find the average marks of all students.
SELECT AVG(Marks) FROM STUDENTS;
Q6. Count the number of students in each class.
SELECT Class, COUNT(*) FROM STUDENTS GROUP BY Class;
Q7. Find the highest marks obtained by any student.
SELECT MAX(Marks) FROM STUDENTS;
Check Out: CBSE Class 12 Computer Science Books
Q8. Update the marks of student with RollNo 2 to 95.
UPDATE STUDENTS SET Marks = 95 WHERE RollNo = 2;
Q9. Delete the record of the student with RollNo 3.
DELETE FROM STUDENTS WHERE RollNo = 3;
Q10. Display student details in ascending order of their names.
SELECT * FROM STUDENTS ORDER BY Name ASC;
Q11. Display the top 3 scorers.
SELECT * FROM STUDENTS ORDER BY Marks DESC LIMIT 3;
Check Out: CBSE 2023 Toppers Talk
Q12. Find the students whose marks are between 80 and 90.
SELECT * FROM STUDENTS WHERE Marks BETWEEN 80 AND 90;
Q13. Display the names of students starting with 'A'.
SELECT Name FROM STUDENTS WHERE Name LIKE 'A%';
Q14. Find the students who have a specific subject (assuming a new column 'Subject')
SELECT * FROM STUDENTS WHERE Subject = 'Physics';
Q15. Calculate the total marks obtained by each student (assuming a new column 'Total')
SELECT Name, SUM(Total) FROM STUDENTS GROUP BY Name;
Check Out: How to Prepare Computer Science for Judiciary Exams?
Frequently Asked Questions
Is it necessary to practice SQL on a computer?
How different is SQL from other programming languages?
What software can I use to practice SQL?
Are normalisation concepts important for SQL questions?
How important are SQL functions in the examination?