如何動態地在查詢中傳遞IN變量。示例如下(使用oracle db): 我想檢查num_pattern模式是否與CALLNUM匹配。輸入參數在查詢存儲過程中傳遞
create or replace PROCEDURE EXECUTE_CDIV
(
CALLNUM IN VARCHAR2,
RESULT OUT VARCHAR2
)
AS
BEGIN
select count(1) into RESULT
from datatable
where num_pattern like 'CALLNUM%' ;
END;
剛剛嘗試這一點'...在那裏同樣CALLNUM || '%'' –