Multiple choice

What will be the output of the following SQL statement? Select * from guest where guestno = (select guestno from booking where datefrom< = current_date and dateto> = current_date and hotelno = (select hotelno from hotel where hname = 'XYZ'));

Tables:
Guest(guestno,gname,gadd)
Hotel(hotelno,hname,city)
Booking(hotelno,guestno,datefrom,datto,roomno)
Room(roomno,hotelno,type,price)

  1. Guest details who are staying in XYZ hotel from the specific date to the current date.

  2. Guest details who are staying in XYZ hotel as on date.

  3. Guest details who are staying in XYZ hotel.

  4. Guest details who are not staying in XYZ hotel as on date.

  5. None of these

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

As per explanation for option 1, option 2 is the correct answer.