Update variables-transact-sql.md#10306
Update variables-transact-sql.md#10306athomas-octoberthree wants to merge 1 commit intoMicrosoftDocs:livefrom
Conversation
Corrected example incorrectly showing two batches of statements separated by GO. This change shows code that accurately reflects the point being made in the section.
|
@athomas-octoberthree : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Tried to follow contrib guidelines at https://learn.microsoft.com/en-us/sql/sql-server/sql-server-docs-contribute?view=sql-server-ver17 to best of my ability |
|
Learn Build status updates of commit d061676: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Can you review the proposed changes? Important: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
There was a problem hiding this comment.
Pull request overview
Updates the Variable scope example in the Transact-SQL variables reference to accurately demonstrate that local variables are scoped to a batch and become invalid after a GO batch separator.
Changes:
- Inserted a
GObatch separator between the variable assignment and the subsequentSELECTthat references the variable.
Corrected example incorrectly showing two batches of statements separated by GO. This change shows code that accurately reflects the point being made in the section.