首页 > 代码库 > Visual studio 中编译错误SQL71006: Only one statement is allowed per batch. A batch separator, such as 'GO', might be required between statements.
Visual studio 中编译错误SQL71006: Only one statement is allowed per batch. A batch separator, such as 'GO', might be required between statements.
把写好的sql脚本,并在mssqlmanager里面编译成功的存储过程脚本复制到vs项目下,出现错误信息如下:SQL71006: Only one statement is allowed per batch. A batch separator, such as ‘GO‘, might be required between statements.加上GO,出现
Error 5 SQL70001: This statement is not recognized in this context.
大意是不允许多条语句在一个脚本里面。
解决方案:VS错认为你的文件是DDL文件,所以它试图编译,解决方案是,右键文件---属性-----Build Action---None
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。