SQL中两个表的比较

Comparison between two tables inSQL

我想知道哪个 "type" 不存在于快照 table 中,但总是出现错误:-

Select  * FROM 
     (Select type from snapshot) AS A where date = CURDATE())
    LEFT JOIN
     (Select type from register) AS B
ON A.type=B.type
WHERE B.type IS NULL

有人可以帮我吗?

In Standard SQL Syntax:

Select  * FROM 
     (Select type from snapshot where date = CURDATE())AS A 
    LEFT JOIN
     (Select type from register) AS B
ON A.type=B.type
WHERE B.type IS NULL

这是一个有效查询的示例:

SELECT a.type 
  FROM snapshot a
  LEFT 
  JOIN register b
    ON b.type = a.type
 WHERE a.date = CURDATE()
   AND b.type IS NULL