I tried with the below code but its throwing an error.
DECLARE TYPE INPUTVALUES IS VARRAY(5) OF VARCHAR(10);
Is ther a way to declare array variables inside the stored procedure.
As far as I know relational databases don't have arrays. They usually work on scalar values.
Is there a way to declare array variables inside the stored procedure.
This is more or less broad as to what you are trying to achieve. An example as to how you can achieve an array sort of thing can be like:
SET @myArray = 'test1,test2,test3'; -- Treat it like an array
SELECT * FROM myTable
WHERE FIND_IN_SET (columnName, @arr);
(This is for MySQL)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With