Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

NCERT Solutions For Class 12 Computer Science Chapter 9 Structured Query Language SQL - 2025-26

ffImage
banner
widget title icon
Latest Updates

Stepwise Solutions & Important SQL Queries for CBSE Class 12 Computer Science

Confused about NCERT Solutions for Class 12 Computer Science Chapter 9 Structured Query Language Sql? You’re in the right place! Here you’ll find clear, exam-friendly steps for every SQL exercise as per the CBSE 2025–26 syllabus, so difficult queries won’t feel overwhelming anymore.


From handy class 12 SQL solutions and exercise-wise answers to tips that match the CBSE marking scheme, our guide makes your practice simple and stress-free. Download the free PDF for easy revision and offline access whenever you need it.


Get stepwise SQL query examples, key definitions, and proven presentation tips—all in line with the marking rubrics. Boost your accuracy and confidence with resources crafted by subject experts for full marks in your Computer Science exam.


Stepwise Solutions & Important SQL Queries for CBSE Class 12 Computer Science

1 (a) Define RDBMS. Name any two RDBMS software.

Answer

An RDBMS is a database system that follows the relational model. It organises information in table structures (rows & columns) and lets you relate, query, and modify that data using SQL. Common examples include MySQL and Oracle Database.

1 (b) What is the purpose of the following clauses in a select statement?

(i) ORDER BY

Answer: Arranges the resulting rows by one or more columns. By default it’s ascending; use DESC for descending and ASC to be explicit about ascending.

(ii) GROUP BY

Answer: Collects rows into groups that share the same values in specified column(s). It’s typically paired with aggregate functions such as SUM, COUNT, or AVG to produce summaries per group.

1(c) Site any two differences between Single Row Functions and Aggregate Functions.

Answer

Single Row Functions

Aggregate Functions

Evaluate one row at a time and yield one value for each row.

Process a set of rows and return a single value per set or per group.

Usable in SELECT, WHERE, ORDER BY, etc.

Used in SELECT/HAVING, often alongside GROUP BY.


1(d) What do you understand by Cartesian Product?

Answer

A Cartesian Product pairs every row of one table with every row of another, producing all possible combinations. In SQL this corresponds to a CROSS JOIN (or listing tables without a join condition).

1(e) Differentiate between the following statements:

(i) ALTER and UPDATE

ALTER statement

UPDATE statement

Changes the definition of database objects (e.g., add/drop columns, keys, indexes).

Changes the stored values in existing rows/columns.

Example: ALTER TABLE Employees ADD Email VARCHAR(255);

Example: UPDATE Employees SET Email='john.doe@example.com' WHERE EmployeeID=101;


(ii) DELETE and DROP

DELETE statement

DROP statement

Removes selected rows; the table and its structure remain intact.

Removes the object itself (e.g., table/view/index) along with its data and structure.

DELETE FROM Employees WHERE Department='Marketing';

DROP TABLE Products;


1 (f) Write the name of the functions to perform the following operations:

Answer

Requirement

Function

Show the weekday for 15 Aug 1947

DAYNAME('1947-08-15')

Extract n characters from a position

SUBSTRING(str, pos, n)

Return month name of a given date

MONTHNAME('yyyy-mm-dd')

Convert a name to uppercase

UPPER('YourName')


2. Write the output produced by the following SQL statements:

(a) SELECT POW(2, 3);

POW(2, 3)

8


(b) SELECT ROUND(342.9234, -1);

ROUND(342.9234, -1)

340


(c) SELECT LENGTH("Informatics Practices");

LENGTH("Informatics Practices")

21


(d) SELECT YEAR("1979/11/26"), MONTH("1979/11/26"), DAY("1979/11/26"), MONTHNAME("1979/11/26");


YEAR("1979/11/26")

MONTH("1979/11/26")

DAY("1979/11/26")

MONTHNAME("1979/11/26")

1979

11

26

November


(e)

SELECT LEFT("INDIA", 3),
      RIGHT("ComputerScience", 4),
      MID("Informatics", 3, 4),
      SUBSTR("Practices", 3);

LEFT("INDIA", 3)

RIGHT("ComputerScience", 4)

MID("Informatics", 3, 4)

SUBSTR("Practices", 3)

IND

ence

form

actices


3. Consider the following MOVIE table and write the SQL queries based on it.

MovieID

MovieName

Category

ReleaseDate

ProductionCost

BusinessCost

001

Hindi_Movie

Musical

2018-04-23

124500

130000

002

Tamil_Movie

Action

2016-05-17

112000

118000

003

English_Movie

Horror

2017-08-06

245000

360000

004

Bengali_Movie

Adventure

2017-01-04

72000

100000

005

Telugu_Movie

Action

-

100000

-

006

Punjabi_Movie

Comedy

-

30500

-


Answer
(a) Display all the information from the Movie table.

SELECT * FROM Movie;

MOVIEID

MOVIENAME

CATEGORY

RELEASEDATE

PRODUCTIONCOST

BUSINESSCOST

 

1

Hindi_Movie

Musical

2018-04-23

124500

130000

2

Tamil_Movie

Action

2016-05-17

112000

118000

3

English_Movie

Horror

2017-08-06

245000

360000

4

Bengali_Movie

Adventure

2017-01-04

72000

100000

5

Telugu_Movie

Action

NULL

100000

NULL

6

Punjabi_Movie

Comedy

NULL

30500

NULL


(b) List business done by the movies showing only MovieID, MovieName and Total_Earning.

SELECT MovieID, MovieName, (ProductionCost + BusinessCost) AS Total_Earning
FROM Movie
WHERE ReleaseDate IS NOT NULL;

MovieID

MovieName

Total_Earning

1

Hindi_Movie

254500

2

Tamil_Movie

230000

3

English_Movie

605000

4

Bengali_Movie

172000


(c) List the different categories of movies.

SELECT DISTINCT Category FROM MOVIE;

Category

Musical

Action

Horror

Adventure

Comedy


(d) Find the net profit of each released movie.

SELECT MovieID, MovieName, BusinessCost - ProductionCost AS NetProfit
FROM Movie
WHERE ReleaseDate IS NOT NULL;

MovieID

MovieName

NetProfit

1

Hindi_Movie

5500

2

Tamil_Movie

6000

3

English_Movie

115000

4

Bengali_Movie

28000


(e) List MovieID, MovieName and Cost for movies with ProductionCost > 10,000 and < 1,00,000.

SELECT MovieID, MovieName, ProductionCost AS Cost
FROM MOVIE
WHERE ProductionCost > 10000 AND ProductionCost < 100000;

MovieID

MovieName

Cost

4

Bengali_Movie

72000

6

Punjabi_Movie

30500


(f) List details of all movies which fall in Comedy or Action.

SELECT * FROM MOVIE
WHERE Category = 'Comedy' OR Category = 'Action';

MOVIEID

MOVIENAME

CATEGORY

RELEASEDATE

PRODUCTIONCOST

BUSINESSCOST 

2

Tamil_Movie

Action

2016-05-17

112000

118000

5

Telugu_Movie

Action

NULL

100000

NULL

6

Punjabi_Movie

Comedy

NULL

30500

NULL


(g) List details of all movies which have not been released yet.

SELECT * FROM MOVIE
WHERE ReleaseDate IS NULL;

MOVIEID

MOVIENAME

CATEGORY

RELEASEDATE

PRODUCTIONCOST

BUSINESSCOST

5

Telugu_Movie

Action

NULL

100000

NULL

6

Punjabi_Movie

Comedy

NULL

30500

NULL


4. Suppose your school management has decided to conduct cricket matches between students of Class XI and Class XII. Students of each class are asked to join any one of the four teams – Team Titan, Team Rockers, Team Magnet and Team Hurricane. During summer vacations, various matches will be conducted between these teams. Help your sports teacher to do the following:

(a) Create a database "Sports".

(b) Create a table "TEAM" with following considerations:

  1. It should have a column TeamID for storing an integer value between 1 to 9, which refers to unique identification of a team.

  2. Each TeamID should have its associated name (TeamName), which should be a string of length not less than 10 characters.

(c) Using table level constraint, make TeamID as the primary key.

(d) Show the structure of the table TEAM using a SQL statement.

(e) As per the preferences of the students four teams were formed as given below. Insert these four rows in TEAM table:

Row 1: (1, Team Titan)
Row 2: (2, Team Rockers)
Row 3: (3, Team Magnet)
Row 4: (4, Team Hurricane)

(f) Show the contents of the table TEAM using a DML statement.

(g) Now create another table MATCH_DETAILS and insert data as shown below. Choose appropriate data types and constraints for each attribute.

Table: MATCH_DETAILS

MatchID

MatchDate

FirstTeamID

SecondTeamID

FirstTeamScore

SecondTeamScore

M1

2018-07-17

1

2

90

86

M2

2018-07-18

3

4

45

48

M3

2018-07-19

1

3

78

56

M4

2018-07-19

2

4

56

67

M5

2018-07-18

1

4

32

87

M6

2018-07-17

2

3

67

51


Answer:

(a) Create the database

CREATE DATABASE Sports;

(b) Create the TEAM table

CREATE TABLE TEAM (
  TeamID   INT,
  TeamName VARCHAR(20)
);

(c) Declare the primary key

ALTER TABLE TEAM
ADD PRIMARY KEY (TeamID);

(d) Display the table structure

DESCRIBE TEAM;

Field

Type

Null

Key

Default

Extra

 

TeamID

int

NO

PRI

NULL


TeamName

char(20)

YES


NULL



(e) Insert the four teams

INSERT INTO TEAM (TeamID, TeamName) VALUES
(1, 'Team Titan'),
(2, 'Team Rockers'),
(3, 'Team Magnet'),
(4, 'Team Hurricane');

(f) Show all rows in TEAM

SELECT * FROM TEAM;

TeamID

TeamName

1

Team Titan

2

Team Rockers

3

Team Magnet

4

Team Hurricane


(g) Create MATCH_DETAILS, insert matches, and view data

CREATE TABLE MATCH_DETAILS (
  MatchID         VARCHAR(10),
  MatchDate       DATE,
  FirstTeamID     INT,
  SecondTeamID    INT,
  FirstTeamScore  INT,
  SecondTeamScore INT,
  CONSTRAINT PK_MatchID PRIMARY KEY (MatchID)
);

INSERT INTO MATCH_DETAILS
(MatchID, MatchDate, FirstTeamID, SecondTeamID, FirstTeamScore, SecondTeamScore) VALUES
('M1', '2018-07-17', 1, 2, 90, 86),
('M2', '2018-07-18', 3, 4, 45, 48),
('M3', '2018-07-19', 1, 3, 78, 56),
('M4', '2018-07-19', 2, 4, 56, 67),
('M5', '2018-07-18', 1, 4, 32, 87),
('M6', '2018-07-17', 2, 3, 67, 51);

SELECT * FROM MATCH_DETAILS;

MatchID

MatchDate

FirstTeamID

SecondTeamID

FirstTeamScore

SecondTeamScore 

M1

2018-07-17

1

2

90

86

M2

2018-07-18

3

4

45

48

M3

2018-07-19

1

3

78

56

M4

2018-07-19

2

4

56

67

M5

2018-07-18

1

4

32

87

M6

2018-07-17

2

3

67

51


5. Using the sports database … write the queries for the following:

Answer

(a) Both teams scored more than 70.

SELECT MatchID
FROM MATCH_DETAILS
WHERE FirstTeamScore > 70 AND SecondTeamScore > 70;


Output:

+---------+

| MatchID |

+---------+

| M1      |

+---------+


(b) FirstTeam < 70 and SecondTeam > 70.

SELECT MatchID
FROM MATCH_DETAILS
WHERE FirstTeamScore < 70 AND SecondTeamScore > 70;


Output

+---------+

| MatchID |

+---------+

| M5      |

+---------+


(c) Matches played by Team 1 and won by it.

SELECT MatchID, MatchDate
FROM MATCH_DETAILS
WHERE FirstTeamID = 1 AND FirstTeamScore > SecondTeamScore;

Output

+---------+------------+

| MatchID | MatchDate  |

+---------+------------+

| M1      | 2018-07-17 |

| M3      | 2018-07-19 |

+---------+------------+

(d) Matches played by Team 2 and not won by it.

SELECT MatchID
FROM MATCH_DETAILS
WHERE SecondTeamID = 2 AND SecondTeamScore <= FirstTeamScore;

Output

+---------+

| MatchID |

+---------+

| M1      |

+---------+

(e) Rename relation and columns.

ALTER TABLE TEAM RENAME TO T_DATA;
ALTER TABLE T_DATA CHANGE COLUMN TeamID  T_ID   INT;
ALTER TABLE T_DATA CHANGE COLUMN TeamName T_NAME CHAR(20);

6. A shop called Wonderful Garments who sells school uniforms maintains a database SCHOOLUNIFORM as shown below. It consisted of two relations - UNIFORM and COST. They made UniformCode as the primary key for UNIFORM relations. Further, they used UniformCode and Size to be composite keys for COST relation. By analysing the database schema and database state, specify SQL queries to rectify the following anomalies.

(a) M/S Wonderful Garments also keeps handkerchiefs of red colour, medium size of Rs. 100 each.

(b) INSERT INTO COST (UCode, Size, Price) values (7, 'M', 100); When the above query is used to insert data, the values for the handkerchief without entering its details in the UNIFORM relation is entered. Make a provision so that the data can be entered in the COST table only if it is already there in the UNIFORM table.

(c) Further, they should be able to assign a new UCode to an item only if it has a valid UName. Write a query to add appropriate constraints to the SCHOOLUNIFORM database.

(d) Add the constraint so that the price of an item is always greater than zero.


Answer:

(b)

ALTER TABLE COST ADD CONSTRAINT fk_uniform_ucode_size FOREIGN KEY (UCode) REFERENCES UNIFORM (UCode);

(c)

ALTER TABLE UNIFORM ADD CONSTRAINT CK_UName_UCode 

CHECK (UName IS NOT NULL);

(d)

ALTER TABLE COST ADD CONSTRAINT CK_Price_Positive CHECK (Price > 0);

7. Consider the following table named "Product", showing details of products being sold in a grocery shop:

PCode

PName

UPrice

Manufacturer

P01

Washing Powder

120

Surf

P02

Toothpaste

54

Colgate

P03

Soap

25

Lux

P04

Toothpaste

65

Pepsodent

P05

Soap

38

Dove

P06

Shampoo

245

Dove


Write SQL queries for the following:

(a) Create the table Product with appropriate data types and constraints.

(b) Identify the primary key in Product.

(c) List the Product Code, Product name and price in descending order of their product name. If PName is the same, then display the data in ascending order of price.

(d) Add a new column Discount to the table Product.

(e) Calculate the value of the discount in the table Product as 10 per cent of the UPrice for all those products where the UPrice is more than 100, otherwise the discount will be 0.

(f) Increase the price by 12 per cent for all the products manufactured by Dove.

(g) Display the total number of products manufactured by each manufacturer.

Write the output(s) produced by executing the following queries on the basis of the information given above in the table Product:

(h) SELECT PName, avg(UPrice) FROM Product GROUP BY Pname;

(i) SELECT DISTINCT Manufacturer FROM Product;

(j) SELECT COUNT (DISTINCT PName) FROM Product;

(k) SELECT PName, MAX(UPrice), MIN(UPrice) FROM Product GROUP BY PName;

Answer:

(a) Create the table Product.

CREATE TABLE Product (
  PCode        VARCHAR(10) PRIMARY KEY,
  PName        VARCHAR(50) NOT NULL,
  UPrice       INT NOT NULL CHECK (UPrice >= 0),
  Manufacturer VARCHAR(50) NOT NULL
);

(b) Identify the primary key in Product.

Answer: PCode is the primary key.

(c) List PCode, PName, UPrice ordered by PName (DESC), then UPrice (ASC).

SELECT PCode, PName, UPrice
FROM Product
ORDER BY PName DESC, UPrice ASC;

Output:


PCode

PName

UPrice

P01

WASHING POWDER

120

P02

TOOTHPASTE

54

P04

TOOTHPASTE

65

P03

SOAP

25

P05

SOAP

38

P06

SHAMPOO

245


(d) Add a new column Discount.

ALTER TABLE Product ADD COLUMN Discount FLOAT;

(e) Set Discount = 10% when UPrice > 100, else 0.

UPDATE Product
SET Discount = CASE WHEN UPrice > 100 THEN UPrice * 0.10 ELSE 0 END;

Output:

PCode

PName

UPrice

Manufacturer

Discount

P01

WASHING POWDER

120

SURF

12

P02

TOOTHPASTE

54

COLGATE

0

P03

SOAP

25

LUX

0

P04

TOOTHPASTE

65

PEPSODENT

0

P05

SOAP

38

DOVE

0

P06

SHAMPOO

245

DOVE

24.5


(f) Raise price by 12% for products by Dove.

UPDATE Product
SET UPrice = ROUND(UPrice * 1.12)
WHERE Manufacturer = 'Dove';


PCode

PName

UPrice

Manufacturer

Discount

P01

WASHING POWDER

120

SURF

12

P02

TOOTHPASTE

54

COLGATE

0

P03

SOAP

25

LUX

0

P04

TOOTHPASTE

65

PEPSODENT

0

P05

SOAP

43

DOVE

0

P06

SHAMPOO

274

DOVE

24.5


(g) Count products by each manufacturer.

SELECT Manufacturer, COUNT(*) AS TotalProducts
FROM Product
GROUP BY Manufacturer;


Manufacturer

TotalProducts

SURF

1

COLGATE

1

LUX

1

PEPSODENT

1

DOVE

2


(h) SELECT PName, avg(UPrice) FROM Product GROUP BY Pname;

PName

avg(UPrice)

WASHING POWDER

120.0000

TOOTHPASTE

59.5000

SOAP

34.0000

SHAMPOO

274.0000


(i) SELECT DISTINCT Manufacturer FROM Product;

Manufacturer

SURF

COLGATE

LUX

PEPSODENT

DOVE


(j) SELECT COUNT (DISTINCT PName) FROM Product;

COUNT(DISTINCT PName)

4


(k) SELECT PName, MAX(UPrice), MIN(UPrice) FROM Product GROUP BY PName;

PName

MAX(UPrice)

MIN(UPrice)

WASHING POWDER

120

120

TOOTHPASTE

65

54

SOAP

43

25

SHAMPOO

274

274


8. Using the CARSHOWROOM database given in the chapter, write the SQL queries for the following:

(a) Add a new column Discount in the INVENTORY table.

(b) Set appropriate discount values for all cars keeping in mind the following:

  1. No discount is available on the LXI model.

  2. VXI model gives a 10 per cent discount.

  3. A 12 per cent discount is given on cars other than LXI model and VXI model.

(c) Display the name of the costliest car with fuel type "Petrol".

(d) Calculate the average discount and total discount available on Baleno cars.

(e) List the total number of cars having no discount.

Answer

Table inventory:

CarId

CarName

Price

Model

YearManufacture

FuelType

FinalPrice

D001

Dzire

582613.00

LXI

2017

Petrol

652526.6

D002

Dzire

673112.00

VXI

2018

Petrol

753885.4

B001

Baleno

567031.00

Sigma1.2

2019

Petrol

635074.7

B002

Baleno

647858.00

Delta1.2

2018

Petrol

725601.0

E001

EECO

355205.00

5 STR STD

2017

CNG

397829.6

E002

EECO

654914.00

CARE

2018

CNG

733503.7

S001

SWIFT

514000.00

LXI

2017

Petrol

575680.0

S002

SWIFT

614000.00

VXI

2018

Petrol

687680.0




(a) Add a new column Discount in INVENTORY.

ALTER TABLE INVENTORY
ADD COLUMN Discount FLOAT;

(b) Set the discounts per model.

UPDATE INVENTORY SET Discount = 0            WHERE Model = 'LXI';
UPDATE INVENTORY SET Discount = Price * 0.10 WHERE Model = 'VXI';
UPDATE INVENTORY
SET Discount = Price * 0.12
WHERE Model NOT IN ('LXI','VXI');

Output:

CarId

CarName

Price

Model

YearManufacture

FuelType

FinalPrice

Discount

D001

Dzire

582613.00

LXI

2017

Petrol

652526.60

0

D002

Dzire

673112.00

VXI

2018

Petrol

753885.40

67311.2

B001

Baleno

567031.00

Sigma1.2

2019

Petrol

635074.70

68043.7

B002

Baleno

647858.00

Delta1.2

2018

Petrol

725601.00

77743

E001

EECO

355205.00

5 STR STD

2017

CNG

397829.60

42624.6

E002

EECO

654914.00

CARE

2018

CNG

733503.70

78589.7

S001

SWIFT

514000.00

LXI

2017

Petrol

575680.00

0

S002

SWIFT

614000.00

VXI

2018

Petrol

687680.00

61400


(c) Name of the costliest Petrol car.

SELECT CarName
FROM INVENTORY
WHERE FuelType = 'Petrol'
  AND Price = (SELECT MAX(Price) FROM INVENTORY WHERE FuelType='Petrol');

Output:

+---------+

       | CarName |

       +---------+

           | Dzire   |

      +---------+


(d) Average and total discount on Baleno cars.

SELECT AVG(Discount) AS AverageDiscount,
      SUM(Discount) AS TotalDiscount
FROM INVENTORY
WHERE CarName='Baleno';

Output:

+-----------------+----------------+

| AverageDiscount | TotalDiscount  |

+-----------------+----------------+

|  72893.33984375 | 145786.6796875 |

+-----------------+----------------+


(e) Count cars with no discount.

SELECT COUNT(*)
FROM INVENTORY
WHERE Discount = 0;


Output:

+----------+

| COUNT(*) |

+----------+

|        2 |

+----------+


All questions are unchanged; only answer wording has been refreshed to ensure originality while preserving meaning and correctness.


Learn Structured Query Language (SQL) in Class 12 Computer Science

Understanding SQL fundamentals is vital for scoring high in Computer Science Class 12. This NCERT Solutions chapter focuses on data definition, manipulation, and constraints in MySQL, helping you strengthen your basics and improve practical database skills.


By practicing chapter-wise NCERT exercises, students can learn core concepts such as DDL, DML, primary keys, foreign keys, and data types. Regular revision of these SQL queries ensures deeper understanding and fast problem-solving during exams.


Stay consistent with your preparation. Focus on solving exercise-based SQL questions, reviewing all constraints and commands. This approach not only boosts conceptual clarity but also builds confidence for practical computer science exams.


CBSE Class 12 Computer Science Chapter-wise NCERT Solutions



CBSE Class 12 Computer Science Study Materials

FAQs on NCERT Solutions For Class 12 Computer Science Chapter 9 Structured Query Language SQL - 2025-26

1. What is the best way to solve NCERT Solutions for Class 12 Computer Science Chapter 9 Structured Query Language (SQL)?

The best way to solve NCERT Solutions for Class 12 Computer Science Chapter 9 (Structured Query Language) is with a step-by-step, exercise-wise approach matching the CBSE exam pattern.

  • Start by understanding core SQL concepts, definitions, and syntax.
  • Write stepwise answers for each NCERT question, including SQL queries, explanations, and relevant examples.
  • Use clear formatting, proper code indentation, and comments in your answers.
  • Revise key SQL commands like SELECT, WHERE, GROUP BY, and JOIN with practical examples from the chapter.
  • Follow the marking scheme: definitions, correct SQL query, structured steps.

2. Are NCERT Solutions enough for Class 12 Computer Science exams?

NCERT Solutions for Class 12 Computer Science Chapter 9 are generally sufficient to prepare for exams, provided you also understand key SQL concepts and syntax.

  • Focus on answering all in-text, back exercises, and exemplar questions.
  • Practice extra SQL queries for deeper understanding and scoring full marks.
  • Use additional sample papers and previous year questions for thorough exam readiness.

3. How do I write stepwise NCERT answers to score full marks for this chapter?

To score full marks in Class 12 Computer Science Structured Query Language questions, structure your answer in clear, exam-aligned steps.

  • Start with definitions or concepts if required.
  • Write correct SQL syntax, with keywords in uppercase.
  • Explain each line of query briefly if it's a long answer.
  • Maintain indentation and comment on important clauses.
  • Underline or highlight key terms/commands.
  • Conclude with the expected output or result, if asked.

4. What topics are covered in Class 12 Computer Science Chapter 9 Structured Query Language (SQL)?

NCERT Class 12 Computer Science Chapter 9 covers the basics and advanced features of SQL, including:

  • Definition and need for SQL
  • Understanding Data Definition Language (DDL) and Data Manipulation Language (DML) commands
  • SELECT, INSERT, UPDATE, DELETE queries
  • Using WHERE, ORDER BY, GROUP BY, HAVING
  • Joins and relationships between tables
  • Writing queries based on single/multiple tables

5. Which Structured Query Language (SQL) questions from Chapter 9 are most likely in my CBSE school exams?

The most expected questions for CBSE Class 12 Computer Science Chapter 9 usually involve:

  • Writing SQL queries for given tables and output.
  • Explaining SQL commands: SELECT, WHERE, GROUP BY, JOIN.
  • Identifying errors and correcting SQL statements.
  • Definition-based short answers and difference between DDL/DML.
  • Query-based questions with two tables (joins).

6. Are definitions or SQL query syntax compulsory in answers?

Yes, definitions and correct SQL query syntax are essential for scoring full marks in NCERT and CBSE exams.

  • Always begin with a definition if the question mentions "define" or "explain".
  • Write SQL queries with proper syntax (uppercase keywords, semicolons).
  • Diagrams, if any, should be neat and labelled as per marking scheme.

7. How do I structure long SQL answers for better marks?

To present long SQL answers:

  • Step 1: Begin with the context or requirement.
  • Step 2: Write each SQL query stepwise, explaining the logic.
  • Step 3: Comment on key clauses like WHERE/GROUP BY.
  • Step 4: Show the expected output format or table structure, if needed.
  • Tip: Number your steps or label each part clearly.

8. Where can I download the PDF for all Chapter 9 solutions?

You can download the complete NCERT Solutions for Class 12 Computer Science Chapter 9 SQL in PDF format for free.

  • Look for the download PDF button on the solution page.
  • The PDF includes step-by-step answers for all exercises (intext, back, exemplar).
  • Offline access helps during last-minute revision and practice.

9. What are the most common mistakes in Class 12 SQL answers and how can I avoid them?

The most common mistakes students make in Class 12 Computer Science SQL answers are:

  • Incorrect SQL syntax or spelling errors (e.g., select instead of SELECT)
  • Missing semicolons or brackets.
  • Forgetting to specify table names or columns.
  • Not writing definitions or explanations where required.
  • Incorrect output/table format.

To avoid these:
  • Revise SQL syntax rules regularly.
  • Read questions carefully before writing queries.
  • Practice past year and exemplar questions to avoid losing marks.

10. How can I revise Class 12 Computer Science Chapter 9 Structured Query Language (SQL) quickly?

For fast and effective revision of Class 12 Computer Science Chapter 9:

  • Review all key definitions, formulae, and SQL commands.
  • Practice at least 5 sets of SQL queries on one and two tables each.
  • Go through stepwise solutions and typical exam questions.
  • Use quick notes and flashcards for key concepts like DML commands and JOIN clauses.
  • Attempt sample papers and MCQs to test understanding.

11. Do examiners award partial marks for correct steps even if the final answer is wrong?

Yes, CBSE examiners often award partial marks for correctly written steps or logic, even if the final SQL output has minor mistakes.

  • Each part of the answer (definition, steps, SQL statement, explanation) is marked separately.
  • Follow the marking scheme and always write each step clearly to maximize your score.

12. Are references to textbook page numbers useful during revision?

Referring to NCERT textbook page numbers during revision can help quickly locate important solved examples and explanations.

  • It is especially helpful for intext questions and exercises.
  • Always cross-check your answers with textbook solutions for accuracy.