Question
Computer Science Question on Query using SQL
What is the output of the following SQL query ?
SELECT * FROM STUDENTS WHERE SName like ‘%S’ and age > 18;
A
Select details of all those students whose name ends with 'S' and age greater than 18
B
Select details of all those students whose name starts with 'S' and age greater than 18
C
Select details of all those students whose name starts and ends with 'S' and age is greater than 18
D
Select details of all those students whose name starts with 'S' or age greater than 18
Answer
Select details of all those students whose name ends with 'S' and age greater than 18
Explanation
Solution
The correct option is (A) :Select details of all those students whose name ends with 'S' and age greater than 18.