如何比较mysql查询中多个表的条件


How to compare condition multile table in mysql query?

如何在MySQL检查条件时比较多个表?

Table1

--------------------------
date       |  Cheque_no
--------------------------
10/10/2015 | 09876543
--------------------------
17/10/2015 | 45678990
--------------------------

----------------------------------------
date       |  Cheque_no  | Amount_Paid
----------------------------------------
10/10/2015 | 09876543    |   1000
----------------------------------------

我使用以下查询:

select * from Cheque,Payment where Cheque.Cheque_no != Payment .Cheque_no 

I am expected the output is

17/10/2015 | 45678990

似乎一个简单的not in条件就能做到这一点:

SELECT *
FROM   cheque
WHERE  cheque_no NOT IN (SELECT cheque_no FROM payment)