Skip to content

Add uniqueness documentation for database identifiers#10301

Open
justlilith wants to merge 2 commits intoMicrosoftDocs:livefrom
justlilith:patch-1
Open

Add uniqueness documentation for database identifiers#10301
justlilith wants to merge 2 commits intoMicrosoftDocs:livefrom
justlilith:patch-1

Conversation

@justlilith
Copy link

Added a rule stating that identifiers must be uniquely named within a database schema or object, including an example demonstrating naming conflicts. I can't find any other documentation on this, so it would be helpful (assuming I'm understanding correctly) to have this available. I ran into a naming conflict and didn't realize there's a bit more specificity to naming.

If anyone can help me find a good source for this, please comment.

Added a rule stating that identifiers must be uniquely named within a database schema or object, including an example demonstrating naming conflicts. I can't find any other documentation on this, so it would be helpful (assuming I'm understanding correctly) to have this available.

I ran into a naming conflict and didn't realize there's a bit more specificity to naming.
@justlilith
Copy link
Author

@microsoft-github-policy-service agree

@prmerger-automator
Copy link
Contributor

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

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 323446f:

✅ Validation status: passed

File Status Preview URL Details
docs/relational-databases/databases/database-identifiers.md ✅Succeeded

For more details, please refer to the build report.

@v-regandowner
Copy link
Contributor

@WilliamDAssafMSFT

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 20, 2026
@v-regandowner v-regandowner requested a review from Copilot March 20, 2026 15:15
Copy link
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

Adds documentation to clarify identifier naming scope/uniqueness rules in SQL Server, motivated by encountering a naming conflict during object creation.

Changes:

  • Adds a new “uniqueness” rule under regular identifier rules.
  • Adds a T-SQL example showing a duplicate primary key constraint name conflict.
  • Adds a note contrasting schema-scoped uniqueness (constraints) with table-scoped uniqueness (columns).

Added explanation about unique identifiers for constraints and provided SQL examples to illustrate primary key naming conflicts.
@justlilith
Copy link
Author

I implemented the suggestions from Copilot.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 308728e:

✅ Validation status: passed

File Status Preview URL Details
docs/relational-databases/databases/database-identifiers.md ✅Succeeded

For more details, please refer to the build report.

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