Pass parameter value like this – 'AA,BB,CC'
. Then, it is enough to use FIND_IN_SET function –
SELECT product_id, product_price
FROM product
WHERE FIND_IN_SET(product_type, param);
More Related Contents:
- Create table variable in MySQL
- Using variable in a LIMIT clause in MySQL
- Stored procedure that Automatically delete rows older than 7 days in MYSQL
- Pass array to MySQL stored routine
- How can I simulate an array variable in MySQL?
- How to raise an error within a MySQL function
- MySQL stored procedure vs function, which would I use when?
- MySQL stored procedures use them or not to use them
- MySQL variable format for a “NOT IN” list of values
- Looping Over Result Sets in MySQL
- MySQL create stored procedure syntax with delimiter
- MySQL : transaction within a stored procedure
- Writing optional parameters within stored procedures in MySQL? [duplicate]
- Dynamic table names in stored procedure function
- mysql stored procedure that calls itself recursively
- MySQL triggers cannot update rows in same table the trigger is assigned to. Suggested workaround?
- How do you debug MySQL stored procedures?
- How can I use transactions in my MySQL stored procedure?
- MySQL error #2014 – Commands out of sync; you can’t run this command now
- use a variable for table name in mysql sproc
- Split a string and loop through values in MySQL stored procedure
- My SQL Dynamic query execute and get ouput into a variable in stored procedure
- Empty IN clause parameter list in MySQL
- How to store Query Result in variable using mysql
- What is dynamic SQL?
- How to use Table output from stored MYSQL Procedure
- How do I write an SP in phpMyAdmin (MySQL)?
- Creating MYSQL Procedure in Laravel 4 Migrations
- is it possible to call a sql script from a stored procedure in another sql script?
- Mysql stored procedure don’t take table name as parameter