开发者

Integer Array in Mysql Stored Procedure

开发者 https://www.devze.com 2023-01-24 07:14 出处:网络
How do i use integer values array in Mysql Stored procedu开发者_StackOverflowre ? This helps for me to do IN condition

How do i use integer values array in Mysql Stored procedu开发者_StackOverflowre ?


This helps for me to do IN condition Hope this will help you..

CREATE  PROCEDURE `test`(IN Array_String VARCHAR(100))
BEGIN
    SELECT * FROM Table_Name
    WHERE FIND_IN_SET(field_name_to_search, Array_String);

END//;

Calling:

call test('3,2,1');


if you want to pass to the stored procedure an array look at

How can I pass an "array" of values to my stored procedure?

and

http://www.coderanch.com/t/505422/Oracle-OAS/pass-Integer-Array-Stored-Procedure

0

精彩评论

暂无评论...
验证码 换一张
取 消