gpt4 book ai didi

mysql - SQL中两个表的比较

转载 作者:行者123 更新时间:2023-11-29 10:09:19 26 4
gpt4 key购买 nike

我想知道快照表中不存在哪种“类型”,但总是出错:-

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

有人可以帮我吗?

最佳答案

以下是有效查询的示例:

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

关于mysql - SQL中两个表的比较,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51299292/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com