How can I programmatically check (parse) the validity of a TSQL statement?

后端 未结 7 498
礼貌的吻别
礼貌的吻别 2020-12-04 10:25

I\'m trying to make my integration tests more idempotent. One idea was to execute rollback after every test, the other idea was to some how programatically parse the text,

7条回答
  •  感情败类
    2020-12-04 10:33

    I think the command you are looking for is SET NOEXEC ON. If you set this for your connection, the queries will be parsed but will not be executed. Another option would be SET PARSEONLY ON, but I'm honestly not sure what the difference between the two really is.

提交回复
热议问题