我想创建一个过程,它接收一个列表作为输入并在WHERE
子句中使用它。怎么做?
代码可能如下所示:
CREATE PROCEDURE proc (list VARCHAR(300 /*which format should i use???*/))
BEGIN
CREATE MULTISET TABLE t1 AS
(
SELECT *
FROM parent_table
WHERE opt IN list
)
WITH DATA;
END;
CALL proc (31,22,11,44,65,51);
THX!