【发布时间】:2013-12-09 13:16:41
【问题描述】:
我想编写一个查询来根据我传入的参数返回一个结果集,但是如果没有匹配的记录,我想返回该参数为空的结果集(我在 where 子句中使用的列可以为空)
我可以将这两种情况合并到一个查询中吗?是不是在性能方面比执行两个单独的查询更好。
execute select * from table where col_name is null
当我没有为 select * from table where col_name = $param) 返回任何内容时
谢谢
【问题讨论】:
标签: sql performance null informix