0

please help me to correct my answer:

STUDYCASE:

The Following tables from part of a database held in a relational Database Management System (DBMS).

Hotel (HotelNo, HotelName, City)
Room (RoomNo, HotelNo, TypeHotel, Price)
Booking (HotelNo, GuestNo, DateFrom, DateTo, RoomNo)
Guess (GuestNo, GuestName, GuestAddress)

Note: Underlined words is primary key

and the question Like this:
LIST THE ROOM THAT ARE CURRENTLY UNOCCUPIED at the HILLTON HOTEL.

and i answer like this:

SELECT Room.RoomNo, Room.TypeHotel
FROM Room, Hotel, Booking, Guess
Where Hotel.HotelName='Hillton' AND Booking.GuestNo=Guess.GuestNo and Guess.Guestno=null;

when i try to interpret this code with insert the value of table Hotel, Room, Booking and guess. but NO OUTPUT from my code.
there is something wrong with mySQL code ?

2
Contributors
1
Reply
3
Views
7 Years
Discussion Span
Last Post by varmadba
0
SELECT Room.RoomNo, Room.TypeHotel
FROM Room, Hotel, Booking, Guess
WHERE Hotel.HotelName='Hillton' AND Booking.GuestNo=Guess.GuestNo AND Guess.Guestno is NULL;

Instead of Guess.Guestno=NULL; use Guess.Guestno is NULL;

Edited by varmadba: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.