()
sqllite3
select *
from orders
where custid = ?
and status in ()
但是失败了
postgres
ksysdb=# select code, applicable_objecttype
from pssystem_ktagtype where applicable_objecttype in ();
ERROR: syntax error at or near ")"
LINE 1: ...pe from pssystem_ktagtype where applicable_objecttype in ();
使用
(null)
ksysdb=# select code, applicable_objecttype
from pssystem_ktagtype where applicable_objecttype in (null);
code | applicable_objecttype
------+-----------------------
(0 rows)
但它在SQL Server和Oracle上工作吗?ansi-sql必须说什么?我猜是这样的
null
无效的