How to pass a variable to a IN clause?

前端 未结 4 1847
灰色年华
灰色年华 2020-11-30 07:28

Lets say I have a SP that has a SELECT statements as follows,

SELECT product_id, product_price FROM product 
WHERE product_type IN (\'AA\',\'BB\         


        
4条回答
  •  孤街浪徒
    2020-11-30 07:50

    Try using a prepared statement: http://dev.mysql.com/doc/refman/5.5/en/sql-syntax-prepared-statements.html

提交回复
热议问题