I am trying to do a multiple join like this
SELECT * FROM (((Customer FULL JOIN Booking ON Customer.ID = Booking.CustID)
FULL JOIN Flight ON Booking.FlightID = Flight.ID)
FULL JOIN FlightRoute ON Flight.RouteID = FlightRoute.ID)
But it is syntactically incorrect according to mysql. Please help
There is no
FULL JOINin MySQL. It’s convoluted but aFULL JOINis equivalent to aUNION ALLbetween aLEFT JOINand aRIGHT JOIN, using a condition to remove duplicates. It’s late in the day and the thought of your 3FULL JOINs in that statement is hurting my head.You do say in Conrad Frix’s answer that removing the
FULLmakes it work, if it does then you have misunderstood howFULL JOINs andINNER JOINs work.For the first
FULL JOINit would look like:Use that basis to form the rest of your statements.