我不明白发生了什么。
这会产生错误
create procedure sp_test
as
/*
/*
a
*/
e'
*/
begin
print''
end
go
“消息 102,级别 15,状态 1,过程 sp_test,第 13 行 'go' 附近的语法不正确。”
虽然这有效
create procedure sp_test
as
/*
/*
a
*/
e
*/
begin
print''
end
go
为什么如果我在主评论中有两个嵌套评论我不能有 ' 符号?我使用 VS Sql compare 来生成 db 脚本发现了这个错误,并且在此之后不可能有任何其他 GO。
而是使用 Sql Management 它将生成没有 GO 的单个 sp_test 脚本。