I am working on a small calendar application and practicing MySQL queries for finding available time slots based on the answer provided by flaschenpost
mysql show time slots avaliable and time slots busy from table
I am studying the query step by step. I ran the query below separately to see what it returns exactly.
(select 1 as place, 'Free' as name union select 2 as place, 'Booked' as name ) as d
inner join bookingEvents b
However, I got a syntax error:
ERROR 1064 (42000): You have an error in your SQL syntax;
I also tried the query below but still getting the same error.
select (select 1 as place, 'Free' as name union select 2 as place, 'Booked' as name ) as d
Please help.