Stop SSMS from scripting SPs using sp_executesql?

前端 未结 2 542
面向向阳花
面向向阳花 2021-02-18 18:19

When I use SSMS to script a stored procedure, it wraps the script in a sp_executesql statement which bugs me. Is there a way to stop SSMS from doing this and use a straight CREA

相关标签:
2条回答
  • 2021-02-18 19:01

    Execute SQL Task Editor (General Page)

    Look at the "QueryIsStoredProcedure" and "BypassPrepare" options

    0 讨论(0)
  • 2021-02-18 19:06

    Turn off the "Include IF NOT EXISTS" option.

    It's at Tools..Options, then click "Scripting" on the explorer pane of the dialog that pops-up. the "IF NOT EXISTS" option is in the second group from the top (Object Scripting options).

    0 讨论(0)
提交回复
热议问题