Skip to content
Worked Examples · Example 11

Q.Write an SQL query to display the Name and Marks of all students who belong to class 'XI-A' from the Student table.

Maharashtra MsbshseTextbookSubjectiveImportance★★★★★est
100% · 13/13 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

The SELECT statement reads data from a table. Two things are needed here:

  1. Choosing columns: because only Name and Marks are wanted (not every column), we name those two columns after SELECT instead of using *.
  2. Choosing rows: because only students of class XI-A are wanted, we add a WHERE clause with the condition Class = 'XI-A'. The text value XI-A is written inside single quotes.

The complete query is:

SELECT Name, Marks FROM Student
WHERE Class = 'XI-A';
``` …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.