Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法将数字数组传递给存储过程以与 IN 运算符一起使用?我有类似的东西
SELECT * FROM table WHERE col IN (1,2,3);
我想(1,2,3)作为一个论点传递。这可能吗?
(1,2,3)
你可以这样尝试
create procedure test (@input1 integer(2) in,@input2 integer(2) in,@input3 integer(2) in) as select * from table where col in (@input1,@input2,@input3);