sql如下:
select card_no from table_a where card_no in(select card_no from table_b where end_date>sysdate() and customer_id='1' )
其中子查詢select card_no from table_b where end_date>sysdate() and customer_id='1'查出來的結果集是"a,b"
但整個sql查出來的結果集卻是“a,b,c”。
把sysdate()換成now()后就沒問題了。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/31694.html
標籤:MySQL
