Passing SQL stored procedure entirety of WHERE clause

后端 未结 5 2055
隐瞒了意图╮
隐瞒了意图╮ 2020-12-11 19:01

I have a SQL stored procedure of the form

SELECT [fields] FROM [table] WHERE @whereSql

I want to pass the procedure an argument (@whereSql)

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-11 19:36

    Make sure you read this fully

    www.sommarskog.se/dynamic_sql.html

提交回复
热议问题