【发布时间】:2013-05-03 14:31:52
【问题描述】:
我正在使用 oracle 上的动态查询,当我将字符串参数传递给 where in 条件时,它不起作用。
for x in (
SELECT DISTINCT column_id
FROM table
WHERE column_id in (in_column_ids)
/* WHERE column_id in (15,16,17) =>works */
/* => in_column_ids is a varchar type which
holds comma separated value */
and column_title=in_column_title /* works */
)
在这里,如果我将值直接保留在该 in_column_ids 上,则查询有效。
但是,作为参数传递的值似乎不适用于where in。
有什么想法吗?
【问题讨论】:
标签: sql database oracle oracle10g where-in