Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两张桌子。第一个表名为 A,第二个表名为 B。然后将两个表与输入数据进行比较。输入数据从“A”表中获取数据,然后用“B”表检查数据,然后当数据不在“B”表中时显示数据。
您需要使用组合两个表LEFT JOIN
LEFT JOIN
SELECT a.* FROM tableA a LEFT JOIN tableB b ON a.colName = b.colName WHERE b.colName IS NULL
colname是定义两个表之间关系的列。
colname