当键入任何单词加冒号时,SSMS将其识别为有效并且能够运行它。为什么?

时间:2022-01-04 03:36:58

Normally when I come across something new I like to take some time learn about it. But I've been searching * and Google and I can't find anything.

通常当我遇到新事物时,我喜欢花一些时间来了解它。但我一直在搜索*和谷歌,我找不到任何东西。

For example:

例如:

blahblah:

will turn blue in SSMS and, if executed, return "Command(s) completed successfully."

将在SSMS中变为蓝色,如果执行,则返回“命令已成功完成”。

I've searched and searched and I can't seem to find anything about it. What feature does it think I am trying running here?

我进行了搜索和搜索,似乎无法找到任何相关信息。它认为我试图在这里运行的功能是什么?

2 个解决方案

#1


2  

Labels used with GOTO

与GOTO一起使用的标签

print 1
goto blahblah
print 2
blahblah:
print 3

1
3

#2


1  

It is a label which you can use GOTO with:

这是一个标签,您可以使用GOTO:

Syntax:

句法:

label:   
...sql...
GOTO label   

See more at GOTO (Transact-SQL)

在GOTO(Transact-SQL)上查看更多信息

#1


2  

Labels used with GOTO

与GOTO一起使用的标签

print 1
goto blahblah
print 2
blahblah:
print 3

1
3

#2


1  

It is a label which you can use GOTO with:

这是一个标签,您可以使用GOTO:

Syntax:

句法:

label:   
...sql...
GOTO label   

See more at GOTO (Transact-SQL)

在GOTO(Transact-SQL)上查看更多信息