Skip to content

Commit 82f3134

Browse files
authored
Merge pull request #6288 from jdobbelaar/patch-1
Semicolon terminators
2 parents 27822f5 + b94d019 commit 82f3134

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

docs/t-sql/language-elements/begin-end-transact-sql.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ GO
6363
IF @@TRANCOUNT = 0
6464
BEGIN
6565
SELECT FirstName, MiddleName
66-
FROM Person.Person WHERE LastName = 'Adams'
67-
ROLLBACK TRANSACTION
68-
PRINT N'Rolling back the transaction two times would cause an error.'
69-
END
70-
ROLLBACK TRANSACTION
71-
PRINT N'Rolled back the transaction.'
66+
FROM Person.Person WHERE LastName = 'Adams';
67+
ROLLBACK TRANSACTION;
68+
PRINT N'Rolling back the transaction two times would cause an error.';
69+
END;
70+
ROLLBACK TRANSACTION;
71+
PRINT N'Rolled back the transaction.';
7272
GO
7373
/*
7474
Rolled back the transaction.
@@ -81,13 +81,13 @@ Rolled back the transaction.
8181
```sql
8282
-- Uses AdventureWorks
8383

84-
DECLARE @Iteration Integer = 0
84+
DECLARE @Iteration Integer = 0;
8585
WHILE @Iteration <10
8686
BEGIN
8787
SELECT FirstName, MiddleName
88-
FROM dbo.DimCustomer WHERE LastName = 'Adams'
89-
SET @Iteration += 1
90-
END
88+
FROM dbo.DimCustomer WHERE LastName = 'Adams';
89+
SET @Iteration += 1 ;
90+
END;
9191
```
9292

9393
## See Also

0 commit comments

Comments
 (0)