Official Class 12 Computer Science Worksheets: Sql
Access printable practice worksheets for Sql designed to align with the 2026-27 academic syllabus for Class 12 Computer Science. These structured exercises help students evaluate their conceptual understanding and improve exam readiness.
Chapter-wise Practice Material: Sql
Navigate directly to the printable exercises for Sql using the digital viewer below. Each practice set allows students to isolate specific topics for thorough review and uninterrupted practice alongside standard textbooks.
Write the SQL commands for the following questions:
1. Create database in your name and create the tables EMPLOYEE and DEPT as given above.
2. To insert records into both the tables.
3. To display the structure of both the tables.
4. To modify the name field in the employee table with 25 characters.
5. To display all rows of both the tables.
6. To display the names of employees who are getting salary in the range 5000 – 10000(both included).
7. To display the details of all employees whose name starts with ‘P’.
8. To display name of those employees ending with ‘a’.
9. To display the names of those employees with exact 6 characters.
10. To display the details of all managers from the Employee table.
11. To change the salary of Bhawna to 40000.
12. To sort the records of employee table in the descending order of salary.
13. To display the names of all clerks and analysts from employee table.
14. To increase the salary of all employees by 10%.
15. To display the name, salary and bonus(salary+20% of salary).
16. To find the number of different jobs present in the table employee.
17. To delete the record of Col.Singvi from employee table.
18. To display the details of all the employees who are either managers or getting a salary less than 7000.
19. To display the details of all employees with doj > ‘1990-01-01’
20. To add a new column named Phone in the employee table and fill with values of your choice.
21. To show the minimum and maximum salary of the employees.
22. To show the sum and average salary of all clerks.
23. To display the job and total salary of employees for each job.
24. To create a view “Company” from employee table containing name, job and salary of employees who are getting salary more than 8000.
25. To change the salary of “Pallav” on the view as 5000. Display both the view and the base table.
26. To display name and deptno of all employees who do not earn a commission (comm field).
27. To find the name of the employee who is getting the maximum salary.
28. To find the name and salary of the employee getting minimum salary.
29. To delete all rows of the employee table and dept table.
30. To drop both employee and dept tables.
I. Multiple choice Questions:
Question. A Database contains one or more_______
a) Data
b) Tables
c) Files
d) Links
Answer. B
Question. A ............ is an organized collection of structured data.
a) Database
b) File
c) DBMS
d) Information
Answer. A
Question. A data ................ is a set of rules that define valid data.
a) Query
b) Constraint
c) Dictionary
d) All of the above
Answer. B
Question. What is not true in respect of DBMS?
a) Database enforces standards
b) Database increases redundancy
c) Database facilitates sharing of data
d) Database helps to maintain integrity
Answer. B
Question. Cardinality is total ___________
a) number of rows in a table
b) number of columns in a table
c) number of data items in a table
d) none of the above
Answer. A
Question. To fetch one record from resultset you may use<curor>………… method.
a) fetch()
b) fetchone()
c) fetchtuple
d) none of these.
Answer. B
Question. To reflect the changes made in the database permanently you need to run……..
a) done()
b) reflect()
c) commit()
d) final
Answer. C
Question. Data about data is _________
a) Data redundancy
b) Meta Data
c) Database schema
d) None of the above
Answer. B
Question. Repetition of data is called ..............
a) Data redundancy
b) Data Description
c) Data inconsistency
d) None of the above
Answer. A
Question. Which of the following statements is not true about relational database?
a) Relational data model is the most widely used data model.
b) The data is arranged as a collection of tables in relational database.
c) Relational database increases data redundancy and inconsistency.
d) None of the above.
Answer. C
Question. The term ____________ is used to refer to a field in a table.
a) Attribute
b) Row
c) Tuple
d) Instance
Answer. A
Question. Which of the following is a disadvantage of file processing system?
a) Data redundancy
b) Data isolation
c) Data inconsistency
d) All of the above
Answer. D
Question. Degree refers to total_________
a) number of rows in a table
b) number of columns in a table
c) number of data items in a table
d) none of the above
Answer. B
Question. Answer the questions based on the table Employee. Table: Employee EMPID ENAME SALARY DEPTNO Email
1001 George 30000 10 George23@yahoo.co.in
1002 Mary 32000 12 Mary_123@yahoo.co.in
1003 Alwin 25000 12 Al_win@gmail.com
1004 Sumit 20000 11 Sumit_222@yahoo.co.in
Question. The cardinality of the table Employee is ……
i) 5
ii) 4
iii) 3
iv) 6
Answer. B
Question. The degree of the table Employee is …….
i) 3
ii) 4
iii) 5
iv) 6
Answer. C
Question. Which column can be made as the primary key in the table Employee?
i) EMPID
ii) EMAIL
iii) Both i and ii
iv) None of the above
Answer. C
Question. If two columns are added to the table Employee, then the cardinality and degree of the table is …… and …… respectively.
i) 4 , 7
ii) 7, 4
iii) 6,5
iv) 5,6
Answer. B
Question. State True/False: Both EMPID and EMAIL can be defined as primary key in the table Employee.
i) True
ii) False
Answer. B
Question. An attribute in a relation is a foreign key if it is the ________ key in any other relation.
a) Candidate
b) Primary
c) Super
d) Sub
Answer. B
Question. A(n) ________ in a table represents a logical relationship among a set of values.
a) Column
b) Key
c) Row
d) Attribute
Answer. C
Question. Which of the following attributes can be considered as a choice for the primary key?
a) Name
b) Street
c) RollNo
d) Subject
Answer. C
Question. Fill in the blanks
1.A ------------------ is a special control structure that facilitates the row by row processing of records in the resultset.
2.After importing mysqlconnector, first of all --------------is established by using connect()
3.-----------------method executes a database query from within Python.
4. Running of sql query through database cursor returns the table records in the form of---------------
5.A connectivity package---------------must be imported before running db connection program.
Answer. 1.database cursor 2.database connection. 3. execute() 4.resultset 5.mysql.connector
Very Short Answer Questions:
Question. What is primary key?
Answer. A primary key is a column or set of columns that contain values that uniquely identify each row in a table.
Question. What do you mean by candidate key?
Answer. It is an attribute or a set of attributes or keys participating for Primary Key, to uniquely identify each record in that table.
Question. What is meant by degree and cardinality of a table?
Answer. Degree refers to the number of attributes/columns in a relation. Cardinality refers to the number of tuples/rows in a relation
Question. What is meant by RDBMS?
Answer. RDBMS (relational database management system) is the software used to store, manage, query, and retrieve data stored in a relational database. The RDBMS provides an interface between users and applications and the database, as well as administrative functions for managing data storage, access and performance.
Please click on below link to download CBSE Class 12 Computer Science Sql Worksheet Set B
Free study material for Computer Science
Practice Worksheet and Study Resources for Class 12 Computer Science Sql
Chapter Practice Questions for Class 12 Computer Science
Review targeted practice exercises for Class 12 Computer Science Sql. Curated to match official CBSE guidelines, these downloadable PDF sheets support daily revision and core concept reinforcement.
Expert Practice Material for Class 12 Computer Science
Built using the official NCERT book for Class 12 Computer Science, these practice materials provide reliable academic guidance. Pair your practice with our recommended NCERT solutions to master optimal problem-solving approaches.
Complete Your Chapter Revision
Wrap up your chapter revision by testing your knowledge against standard question formats. Everything on our platform is provided free of charge.
FAQs
You can download the teacher-verified PDF for CBSE Class 12 Computer Science Sql Worksheet Set 02 from StudiesToday.com. These practice sheets for Class 12 Computer Science are designed as per the latest CBSE academic session.
Yes, our CBSE Class 12 Computer Science Sql Worksheet Set 02 includes a variety of questions like Case-based studies, Assertion-Reasoning, and MCQs as per the 50% competency-based weightage in the latest curriculum for Class 12.
Yes, we have provided detailed solutions for CBSE Class 12 Computer Science Sql Worksheet Set 02 to help Class 12 and follow the official CBSE marking scheme.
Daily practice with these Computer Science worksheets helps in identifying understanding gaps. It also improves question solving speed and ensures that Class 12 students get more marks in CBSE exams.
All our Class 12 Computer Science practice test papers and worksheets are available for free download in mobile-friendly PDF format. You can access CBSE Class 12 Computer Science Sql Worksheet Set 02 without any registration.