SQL Query: looking for null -


The question is: You want to be the first to pick and pick up seats to fly. For all codes, search flight_num and date for which there is no reservation

from the following tables:

  • Flights
  • Departure ( flight_name, date, aircraft_type )
  • flight_num, airplane, destaka ) > Passenger ( traveler_ id, passenger_name, passenger_address
  • booking ( passenger_id, flight_name, date, seat_number )

    My answer was:

      SELECT D.flight_num, D.date FROM DEPARTURES D, BOOKINGS B WHERE B.passenger_id = NULL   

    I know It is wrong, but someone can tell me why? What is the answer?

    This is better :

      SELECT D.flight_num, DEPARTURES D JOINING BOOKING from D.date B on D.Flight_NU = BFLM, where B. traveler iid faucet   

    I'm not sure that this would be possible to book, but a seat number is not reserved if that is the case, then you have to change the WHERE clause for that.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -