Multiple choice

Which of the following is the correct query to display name of student from the student table having name as 'aman' or 'harish'?

  1. select name from studentwhere name ='aman' and 'harish';

  2. select 'aman' and 'harish'from student;

  3. select namefrom studentwhere name like 'aman' or name like 'harish';

  4. select name from studentwhere name is 'aman' and 'harish';

  5. select 'aman' and 'harish'from studentwhere name = student;

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This is the correct query as it makes use of like predicate to match the correct student names.