开发者

Multiple condition in a single IF in select query

开发者 https://www.devze.com 2023-02-11 04:08 出处:网络
SELECT IF(utc_timestamp >= DATE_ADD( initial_time, INTERVAL length_in_duration MINUTE) AND date(utc_开发者_运维百科timestamp) < (closing_date)), 1 ,0) FROM table;
SELECT IF(utc_timestamp >= DATE_ADD( initial_time, INTERVAL length_in_duration MINUTE)
          AND date(utc_开发者_运维百科timestamp) < (closing_date)), 1 ,0) FROM table;

I get MySQL syntax error, any one please help.


There is a extra ) after closing_date))

I highly suggest you using a editor like Notepad++, where you can highlight parentheses/brackets and it will find the matching close/open ones.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号