How to pass a variable to a IN clause?

前端 未结 4 1836
灰色年华
灰色年华 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:57

    create a user-defined function that will convert the comma separated value into table, and by join this two can get the desired result.

    for more

提交回复
热议问题