M
M
Max Trophy2017-01-12 17:27:36
SQL
Max Trophy, 2017-01-12 17:27:36

What does the symbol mean? in TSQL?

The tutorials contain examples with CTE , in which the expression begins with ;WITH ...... The
question is, why a semicolon at the beginning?
I even work with her.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
res2001, 2017-01-12
@kapitoly

Apparently like the ending of the previous command.
If there are no commands before, the command is empty.

D
d-stream, 2017-01-12
@d-stream

And in which tutorials exactly? MSDN doesn't do that: https://msdn.microsoft.com/en-us/library/ms175972.aspx

A
Artyom Tokarevsky, 2017-01-12
@artemt

A semicolon ends a statement in SQL. As a rule, it is not needed and is not used. But CTE will not work without it if there are previous commands.
PS Quoting from a previous link where "MSDN doesn't do that": "If a common table expression is used in a statement that is part of a package, then the statement preceding it must be followed by a semicolon."

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question