【发布时间】:2019-07-12 06:22:21
【问题描述】:
我有一个数据数组,我使用它从表中选择行。为此,我在 where 子句中使用运算符的成员。我想知道我们是否可以通过使用 Like 运算符和运算符成员来做同样的事情。
当我的数组包含{Delhi, Mumbai, Kolkata} 我选择行中具有这三个值的行。 我就是这样做的:
select ...
Into...
From xyz where city member of array;
///Receiving the array from an in parameter of the stored procedure.
而且效果很好。
但是如果my array has {Del, Mum, Kolk} //parts of the actual names
我如何将这个数组用于相同的目的,也许使用 Like 运算符。
Create or replace zz2(ar in array_collection, c out sys_refcursor)
Is
anotherabc tablename.city%type
Begin
Open c
For
Select ABC
Into anotherabc
From tablename where city member of ar;
End zz2;
我希望输出包含所有具有以数组中的字母/字符开头的城市的行。使用运算符的成员
【问题讨论】:
标签: sql oracle stored-procedures memberof