PostgreSQL中的引号和null
今天工作时写了一个sql,但是PostgreSQL总是提示有语法错误,简单的做个记录:
1 #1、select id, delivery_date, sal_plan_date from zaiko_shop where id=""; 2 #2、select id, delivery_date, sal_plan_date from zaiko_shop where id=‘‘;
1 SELECT COUNT(*) AS adv_num 2 FROM zaiko_shop 3 WHERE delivery_date!=null 4 AND sal_plan_date != null 5 AND to_char(delivery_date,‘YYYY-MM‘) != to_char(sal_plan_date,‘YYYY-MM‘) 6 AND shop_id=1031 7 AND del_flag=0 8 AND sal_plan_date BETWEEN ‘2014-01-01‘ AND ‘2014-12-31‘;
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。