Skip to content

Update variables-transact-sql.md#10306

Open
athomas-octoberthree wants to merge 1 commit intoMicrosoftDocs:livefrom
athomas-octoberthree:patch-1
Open

Update variables-transact-sql.md#10306
athomas-octoberthree wants to merge 1 commit intoMicrosoftDocs:livefrom
athomas-octoberthree:patch-1

Conversation

@athomas-octoberthree
Copy link
Copy Markdown

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.

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.
@prmerger-automator
Copy link
Copy Markdown
Contributor

@athomas-octoberthree : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@athomas-octoberthree
Copy link
Copy Markdown
Author

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-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit d061676:

✅ Validation status: passed

File Status Preview URL Details
docs/t-sql/language-elements/variables-transact-sql.md ✅Succeeded

For more details, please refer to the build report.

@v-dirichards v-dirichards requested a review from Copilot March 26, 2026 15:37
@v-dirichards
Copy link
Copy Markdown
Contributor

@rwestMSFT

Can you review the proposed changes?

Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator bot added the aq-pr-triaged tracking label for the PR review team label Mar 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 GO batch separator between the variable assignment and the subsequent SELECT that references the variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants