本文介绍了将条件放在可为空的列上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

select count(*) from passengermaster where (ticket_issue_date is not null and ticket_issue_date > 2009-01-01);


并不是每位注册乘客都会获得一张票,但是对于那些已经获得票证的乘客,我想算一下
2009年1月1日之后发行的所有票证.
我得到正确的答案,但在良好的措施下,我还会收到错误1292-错误的值.


Not every registered passenger will have been issued a ticket, but for those that have, I want a count of
all tickets issued after 01/01/09.
I am getting the correct answer, but for good measure I also get Error 1292 - Incorrect value.
Any assistance in eliminating the error is much appreciated

推荐答案

select count(*) from passengermaster where ticket_issue_date > ''2009-01-01'';


这篇关于将条件放在可为空的列上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 16:14