[英]Select From tbl1 not listed in tbl2
我需要進行MySQL查詢,以從TBL2
未列出的TBL1
選擇記錄,但不能與我的查詢一起使用。
SELECT deleted_guids.guid_type
, HEX(data_table.guid_id) as guid_id
, HEX(data_table.guid_type) as guid_type
FROM data_table
LEFT JOIN deleted_guids
ON data_table.guid_id = deleted_guids.guid_id
AND data_table.guid_type = deleted_guids.guid_type
WHERE deleted_guids.guid_type = NULL;
您需要在最后將= NULL
更改為IS NULL
。 那是正確的語法。 請參見使用NULL
值 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.