Add uniqueness documentation for database identifiers#10301
Add uniqueness documentation for database identifiers#10301justlilith wants to merge 2 commits intoMicrosoftDocs:livefrom
Conversation
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.
|
@microsoft-github-policy-service agree |
|
@justlilith : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Learn Build status updates of commit 323446f: ✅ 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
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.
|
I implemented the suggestions from Copilot. |
|
Learn Build status updates of commit 308728e: ✅ Validation status: passed
For more details, please refer to the build report. |
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.