CBSE Class 12 Computer Science Sql Worksheet Set A

Access the latest CBSE Class 12 Computer Science Sql Worksheet Set A. We have provided free printable Class 12 Computer Science worksheets in PDF format, specifically designed for Sql. These practice sets are prepared by expert teachers following the 2025-26 syllabus and exam patterns issued by CBSE, NCERT, and KVS.

Sql Computer Science Practice Worksheet for Class 12

Students should use these Class 12 Computer Science chapter-wise worksheets for daily practice to improve their conceptual understanding. This detailed test papers include important questions and solutions for Sql, to help you prepare for school tests and final examination. Regular practice of these Class 12 Computer Science questions will help improve your problem-solving speed and exam accuracy for the 2026 session.

Download Class 12 Computer Science Sql Worksheet PDF

 

STRUCTURED QUERY LANGUAGE(SQL)

Q. Create the table TEACHER given below:

CBSE Class 12 Computer Science Sql Worksheet Set A 1

Write commands in SQL for the questions (1) to (34) given below.
 
1. To create the table TEACHER with the constraints as mentioned above.
2. To insert the first two rows as shown in the above table.
3. To display the structure of the table.
4. To modify the name field with 25 characters.
5. To display the entire information of all teachers.
6. To display all information about teachers of ‘PGT’ category.
7. To list the names of female teachers of Hindi department.
8. To list names, departments and date of hiring of all the teachers in ascending order of hiredate.
9. Display the names of all teachers in descending order of salary.
10. To display the details of all teachers with hiredate > ‘1990-01-01’.
11. To display name and salary of those teachers who are not in English , Math or Science department.
12. To display list of teachers whose category is NULL.
13. To display name, department and hiredate of those teachers who are not ‘PGT’.
14. To display name and gender of those teachers who are in English, Hindi or Art department.
15. To display list of teachers of English department or salary > 30000.
16. To display details of teachers where second alphabet is ‘a’.
17. To display names of teachers where first alphabet is ‘S’.
18. To display names with exactly 12 characters(including space).
19. To display name which is ending with letter ‘a’.
20. To display the names of all departments (non-redundant).
21. To display name and salary of teachers having salary in the range of 20000 and 40000.
22. To find the minimum and maximum salary of teachers.
23. To display the name and salary of the teacher having maximum salary.
24. To count number of teachers in Hindi department.
25. To find the average salary.
26. To find the total salary of all teachers.
27. To count teachers department wise.
28. To display the department name with 2 or more teachers.
29. To increase the salary of Nandita Arora by 5000
30. To display teachers name with the text is in the department of department name.
31. To add one more column ‘Address’ with 30 characters to table teacher.
32. To delete the row with id 7.
33. To delete all rows of the teacher table.
34. To drop the table teacher.
 
Interface Python with SQL database

I. Multiple choice Questions:

Question. A _____ is a property of the entire relation, rather than of the individual tuples in which each tuple is unique.
a) Rows
b) Key
c) Attribute
d) Fields
Answer. B

Question. Which of the following is not a legal method for fetching records from database.
a) fetchone()
b) fetchtwo()
c) fetchall()
d) fetchmany()
Answer. B

Question. To run an sql query from within python you may use cursor.------------- method.
a) query()
b) execute()
c) commit()
d) final()
Answer. B

Question. A database …………..controls the connection to an actual database , established in program.
a) database object
b) connection object
c) fetch object
d) query object
Answer. B

Question. Which one of the following attribute can be taken as a primary key?
a) Name
b) Street
c) Id
d) Department
Answer. C

Question. DBMS stands for_____________
a) Data Base Management Software
b) Data Base Maintenance System
c) Data Basic Management System
d) Data Base management system
Answer. D

Question. In RDBMS, R stands for_________
a) Relational
b) Rotational
c) Rational
d) None of the above
Answer. A

Question. A relational database consists of a collection of ..............
a) Fields
b) Records
c) Keys
d) Tables
Answer. D

Question. A row in a database.
a) Field
b) Record
c) Key
d) Table
Answer. B

Question. A _________ integrity constraint requires that the values appearing in specified attributes of any tuple in the referencing relation also appear in specified attributes of at least one tuple in the referenced relation.
a) Referencing
b)Referential
c)Primary
d)Specific
Answer. B

Question. Referential Integrity is a rule that ensures ____________ between records in related tables are valid.
a) Links
b) difference
c) relationship
d) similarity
Answer. C

Question. Mismatched redundant copies of data is known as data ............
a) Dependence
b) Inconsistency
c) Isolation
d) Redundancy
Answer. B


Question. Fill in the blanks:

1) ___________ helps in efficient retrieval, inserting and deleting of data.
2) ___________ is a software for creating and managing databases.
3) _________ means that data is accurate and consistent in the database.
4) ______________- ensure that the database properly changes states upon a successfully committed transaction.
5) RDBMS stands for __________.
6) In RDBMS a database is considered as a collection of ___________
7) Collection of rows and columns are called as ______________
8) Record is also called as a ____________
9) The group of one or more columns used to uniquely identify each row of a relation is called________
10) __________ is data about data.
11) A _________ is a request to a database for obtaining information in a desired way.
12) ___________ is collection of values from which the value is derived for a column.
13) _______ are the columns of a table that points to the primary key of another table.
Answer. 
1 Database
2 DBMS
3 Data integrity
4 Consistency
5 Relational Database Management System
6 Interrelated data
7 Table
8 Tuple
9 Primary key
10 Meta – data
11 Query
12 Domain
13 Foreign key


Very Short Answer Questions:

Question. What is meant by a database?
Answer. A database is an organized collection of structured information, or inter-related data, typically stored in a computer system.

Question. What is meant by database schema?
Answer. Database schema is also called the visual or logical architecture as it tells us how the data are organized in a database.

Question. What is meant by data constraint?
Answer. Restrictions or limitations are put on the type of data that can be inserted in one or more columns of a table to ensure accuracy and reliability of data in the database.

Question. What is meant by relation?
Answer. A relation is a named, two dimensional table storing logically related data.

Please click on below link to download CBSE Class 12 Computer Science Sql Worksheet Set A

Sql CBSE Class 12 Computer Science Worksheet

Students can use the Sql practice sheet provided above to prepare for their upcoming school tests. This solved questions and answers follow the latest CBSE syllabus for Class 12 Computer Science. You can easily download the PDF format and solve these questions every day to improve your marks. Our expert teachers have made these from the most important topics that are always asked in your exams to help you get more marks in exams.

NCERT Based Questions and Solutions for Sql

Our expert team has used the official NCERT book for Class 12 Computer Science to create this practice material for students. After solving the questions our teachers have also suggested to study the NCERT solutions  which will help you to understand the best way to solve problems in Computer Science. You can get all this study material for free on studiestoday.com.

Extra Practice for Computer Science

To get the best results in Class 12, students should try the Computer Science MCQ Test for this chapter. We have also provided printable assignments for Class 12 Computer Science on our website. Regular practice will help you feel more confident and get higher marks in CBSE examinations.

Where can I download latest CBSE Practice worksheets for Class 12 Computer Science Sql

You can download the CBSE Practice worksheets for Class 12 Computer Science Sql for the latest session from StudiesToday.com

Are the Class 12 Computer Science Sql Practice worksheets available for the latest session

Yes, the Practice worksheets issued for Sql Class 12 Computer Science have been made available here for the latest academic session

Is there any charge for the Practice worksheets for Class 12 Computer Science Sql

There is no charge for the Practice worksheets for Class 12 CBSE Computer Science Sql you can download everything free

How can I improve my scores by solving questions given in Practice worksheets in Sql Class 12 Computer Science

Regular revision of practice worksheets given on studiestoday for Class 12 subject Computer Science Sql can help you to score better marks in exams

Are there any websites that offer free Practice test papers for Class 12 Computer Science Sql

Yes, studiestoday.com provides all the latest Class 12 Computer Science Sql test practice sheets with answers based on the latest books for the current academic session