走过肯的sql
select * from table t where decode(?,'1',zd='1','0',nvl(zd,'0')=0)
在decode 函数中不能使用 zd = '1' 这样 的形式,不支持比较符号,= > < 等,只能 输出字段值使用。
修改后:
select * from table t where ? = decode(zd,'1','1','0',nvl(zd,'0'))
走过肯的sql
select * from table t where decode(?,'1',zd='1','0',nvl(zd,'0')=0)
在decode 函数中不能使用 zd = '1' 这样 的形式,不支持比较符号,= > < 等,只能 输出字段值使用。
修改后:
select * from table t where ? = decode(zd,'1','1','0',nvl(zd,'0'))