app_date table
+------------+----------------+----------+------------+
| patient_ID | slotNo | staff_ID | appo_date |
+------------+----------------+----------+------------+
| 100 | 1 | G1 | 2003-02-12 |
| 101 | 1 | G1 | 2003-02-14 |
| 115 | 1 | G1 | 2003-02-15 |
| 103 | 10 | G1 | 2003-02-12 |
| 107 | 2 | G1 | 2003-02-14 |
| 101 | 3 | G1 | 2003-02-12 |
| 109 | 3 | G1 | 2003-02-14 |
| 104 | 4 | G1 | 2003-02-13 |
| 105 | 5 | G1 | 2003-02-13 |
| 102 | 6 | G1 | 2003-02-12 |
| 108 | 7 | G1 | 2003-02-14 |
| 106 | 8 | G1 | 2003-02-14 |
+------------+----------------+----------+------------+
slot table
+--------+-----------+----------+----------+
| slotNo | time_from | time_to | staff_ID |
+--------+-----------+----------+----------+
| 1 | 09:00:00 | 09:30:00 | G1 |
| 2 | 09:30:00 | 10:00:00 | G1 |
| 3 | 10:00:00 | 10:30:00 | G1 |
| 4 | 10:30:00 | 11:00:00 | G1 |
| 5 | 11:00:00 | 11:30:00 | G1 |
| 6 | 11:30:00 | 12:00:00 | G1 |
| 7 | 12:00:00 | 12:30:00 | G1 |
| 8 | 12:30:00 | 01:00:00 | G1 |
| 9 | 01:00:00 | 01:30:00 | G1 |
| 10 | 01:30:00 | 02:00:00 | G1 |
+--------+-----------+----------+----------+
I am tring to show the slotNo in slots table that is not in
slotno in app_date table, for example I have wrote this query
to display the differences between to column
SELECT slotNo, time_from
FROM slots, app_date
WHERE slots.staff_ID='G1'
and appo_date='2003-02-12'
and slots.slotNo < app_date.slotNo
the result should show
2,4,5,7,8,9
please some one help me...