我想通過比較u.fld_id = ct.fld_teacher_id
並且如果ct.fld_teacher_id爲空,我將顯示尚未分配的教師信息。但是具有空ct.fld_teacher_id的行在執行時不會顯示。Null以及Null值
這是我的查詢。
SELECT ct.fld_id as id, ct.fld_serial, ct.fld_city, ct.fld_venue_name,
ct.fld_start_time, ct.fld_end_time,
ct.fld_duration, ct.fld_available_seats,
ct.fld_course_price, ct.fld_status,
c.fld_name, u.fld_first_name, u.fld_last_name,
ct.fld_status, ct.fld_teacher_id, ct.fld_training_name,
ct.fld_class, ct.fld_level, ct.fld_is_fixed, tt.fld_name as training_type_name
FROM tbl_course_training as ct, tbl_users as u,
tbl_courses as c, tbl_training_types as tt
WHERE c.fld_id = ct.fld_course_id AND u.fld_id = ct.fld_teacher_id AND
ct.fld_teacher_id = 'NULL' AND tt.fld_id = ct.fld_training_type_id
您能向我們展示一些示例數據嗎? – Pranav