Skip
Arish's avatar

26. Practice - OR Condition


Exercise: Either Condition

Find students who are either in grade A OR have marks above 90.

Solution

sql
1SELECT * FROM students
2WHERE grade = 'A'
3OR marks > 90;

Practice More

sql
1-- Age 12 or 14
2SELECT * FROM students
3WHERE age = 12
4OR age = 14;
5
6-- Ruby or HTML course
7SELECT * FROM students
8WHERE course = 'Ruby'
9OR course = 'HTML';