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
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:
- Choosing columns: because only
NameandMarksare wanted (not every column), we name those two columns afterSELECTinstead of using*. - Choosing rows: because only students of class
XI-Aare wanted, we add aWHEREclause with the conditionClass = 'XI-A'. The text valueXI-Ais 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.