retagged by
593 views
3 votes
3 votes
select studentid, studentname from student 
where birthyear <=ALL( select birthyear from student);

  1. Returns detail of the youngest student
  2. Returns detail of oldest student

Should not the answer be 2) ?

retagged by

2 Answers

1 votes
1 votes
yes if birthyear  is stored as number with size 4
0 votes
0 votes
Yes, if A's birthyear is less than B's. Then A is older than B.

Therefore the answer is 2nd i.e. returns detail of oldest students.

Related questions

7 votes
7 votes
1 answer
1
0 votes
0 votes
1 answer
4
rayhanrjt asked Jan 6, 2023
719 views
Write SQL command to find DepartmentID, EmployeeName from Employee table whose average salary is above 20000.