选择我的 sql 查询中的 IF 条件 [英] IF condition in select my sql query
本文介绍了选择我的 sql 查询中的 IF 条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
select if ((date_add(initial_time , length_of_duration)<=concat(closing_date, '23:59:59'), 1, 0)
from tablename;
我收到语法错误,请.你能帮我找到正确的语法吗
I get syntax error, pls. can you help me to get the right syntax
推荐答案
你有一个额外的 (
:
SELECT IF (
DATE_ADD( initial_time, length_of_duration )
<=
CONCAT( closing_date )
, 1, 0
)
从表名
这篇关于选择我的 sql 查询中的 IF 条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文