I'm having a problem with my Select command, first of all, I need to show all the hours that are different from the idHour on other table here's the code:
SELECT DISTINCT Hours
FROM agenda_hours A
JOIN appoitment_hour B
ON (A.idHours <> B.Hour);
Result:
+----------+ | Hours | +----------+ | 07:00 | | 07:30 | | 08:00 | | 08:30 | | 09:00 | | 09:30 | | 10:00 | | 10:30 | | 11:00 | | 11:30 | | 12:00 | | 12:30 | | 13:00 | | 13:30 | | 14:00 | | 14:30 | | 15:00 | | 15:30 | | 16:00 | | 16:30 | | 17:00 | | 17:30 | | 18:00 | | 18:30 | | 19:00 | | 19:30 | | 20:00 | +----------+