Home > database >  With sysdate in mysql in the subquery, cause the query result is not correct
With sysdate in mysql in the subquery, cause the query result is not correct

Time:09-27

SQL is as follows:
The select card_no from table_a where card_no in (select card_no from table_b where end_date & gt; Sysdate () and customer_id='1')
The subquery select card_no from table_b where end_date & gt; Sysdate () the customer_id='1' and found out the result set is "a, b
"But the entire SQL found out the result set is "a, b, c,"
The sysdate () for now (after) was no problem,

CodePudding user response:

I also met with similar problem but really think impassability, why ah
  • Related