3

How do i use integer values array in Mysql Stored procedure ?

Sweety
  • 4,752
  • 13
  • 55
  • 83

2 Answers2

3

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');
Raj
  • 596
  • 5
  • 16
2

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

Community
  • 1
  • 1
Haim Evgi
  • 120,002
  • 45
  • 212
  • 219