3

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

Ruchi
  • 5,032
  • 13
  • 59
  • 84

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
  • 706
  • 8
  • 18
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
  • 123,187
  • 45
  • 217
  • 223