Skip to content

Commit 2ea0cf6

Browse files
authored
Add Service Broker statements to semicolon recommendation
1 parent 4fc0092 commit 2ea0cf6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

SQL Server Name Convention and T-SQL Programming Style.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,12 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines.
296296
Semicolon is mandority for:
297297
1. [Common table expression `WITH CTE `](https://docs.microsoft.com/sql/t-sql/queries/with-common-table-expression-transact-sql):
298298
> When a CTE is used in a statement that is part of a batch, the statement before it must be followed by a semicolon.
299-
3. [`Merge`](https://docs.microsoft.com/sql/t-sql/statements/merge-transact-sql) statements:
299+
2. [`Merge`](https://docs.microsoft.com/sql/t-sql/statements/merge-transact-sql) statements:
300300
> The MERGE statement requires a semicolon (;) as a statement terminator. Error 10713 is raised when a MERGE statement is run without the terminator.
301-
5. [`TROW`](https://docs.microsoft.com/sql/t-sql/language-elements/throw-transact-sql) exceptions:
301+
3. [`TROW`](https://docs.microsoft.com/sql/t-sql/language-elements/throw-transact-sql) exceptions:
302302
> The statement before the THROW statement must be followed by the semicolon (;) statement terminator.
303+
4. All [Service Broker statements](https://docs.microsoft.com/sql/t-sql/statements/send-transact-sql):
304+
> If the SEND statement isn't the first statement in a batch or stored procedure, the preceding statement must be terminated with a semicolon (;).
303305
304306
- All script files should end with `GO` and line break. This is neccesary for batching scripts run throw `sqlcmd` or another tools.
305307
- Keywords should be in **UPPERCASE**: `SELECT`, `FROM`, `GROUP BY` etc. This increases the readability of the code.

0 commit comments

Comments
 (0)