テーブルから行を選択するために使用するデータの配列があります。そのために、where 句で member of operator を使用します。同じことができるかどうかを知りたいのですが、Like 演算子を operator のメンバーと一緒に使用します。
配列が {Delhi, Mumbai, Kolkata} で構成されている場合、行にこれら 3 つの値を持つ行を選択します。これは私がそれを行う方法です:
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;
出力には、配列に存在するアルファベット/文字で始まる都市を持つすべての行が含まれることを期待しています。オペレーターのメンバーの使用