| route-pattern | /:user_id/:repository |
| route-controller | files |
| route-action | disambiguate |
| fetch-nonce | v2:6cc66ac9-6f6e-48d0-0716-b74e5fabe431 |
| current-catalog-service-hash | f3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb |
| request-id | DFB6:1889FD:4B19C33:67306E4:69780AF9 |
| html-safe-nonce | 5482d4add8e4905050ddc2f86f9591b0fa0c8a91b54cf092588b3eb656ed5e85 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERkI2OjE4ODlGRDo0QjE5QzMzOjY3MzA2RTQ6Njk3ODBBRjkiLCJ2aXNpdG9yX2lkIjoiNDI1MTYzMDE4MDEwNDY2OTk0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e98ea07f746158221263ab25cdb708d38d3897ff29f9b556ca63d28d8dfbae6c |
| hovercard-subject-tag | repository:645058893 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | // |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/SQLauto/DBBestPractices |
| twitter:image | https://opengraph.githubassets.com/18f52a63dc7359e6e37f08a0623ae32cd8f42e5daa769314c265e219439f9a5f/SQLauto/DBBestPractices |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/18f52a63dc7359e6e37f08a0623ae32cd8f42e5daa769314c265e219439f9a5f/SQLauto/DBBestPractices |
| og:image:alt | Contribute to SQLauto/DBBestPractices development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e71ed39771d00f42ce2fc9320895c8c608c164191e118eae487fc3bd0af6886d |
| turbo-cache-control | no-preview |
| go-import | github.com/SQLauto/DBBestPractices git https://github.com/SQLauto/DBBestPractices.git |
| octolytics-dimension-user_id | 15952099 |
| octolytics-dimension-user_login | SQLauto |
| octolytics-dimension-repository_id | 645058893 |
| octolytics-dimension-repository_nwo | SQLauto/DBBestPractices |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 644972371 |
| octolytics-dimension-repository_parent_nwo | kevinmartintech/SQL-Server-Database-Development-Best-Practices |
| octolytics-dimension-repository_network_root_id | 644972371 |
| octolytics-dimension-repository_network_root_nwo | kevinmartintech/SQL-Server-Database-Development-Best-Practices |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4919f24054c1e9bf76d7b543cb2ac018075b18ce |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#start-of-content |
|
| https://patch-diff.githubusercontent.com/ |
|
Sign in
| https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FSQLauto%2FDBBestPractices |
| GitHub CopilotWrite better code with AI | https://github.com/features/copilot |
| GitHub SparkBuild and deploy intelligent apps | https://github.com/features/spark |
| GitHub ModelsManage and compare prompts | https://github.com/features/models |
| MCP RegistryNewIntegrate external tools | https://github.com/mcp |
| ActionsAutomate any workflow | https://github.com/features/actions |
| CodespacesInstant dev environments | https://github.com/features/codespaces |
| IssuesPlan and track work | https://github.com/features/issues |
| Code ReviewManage code changes | https://github.com/features/code-review |
| GitHub Advanced SecurityFind and fix vulnerabilities | https://github.com/security/advanced-security |
| Code securitySecure your code as you build | https://github.com/security/advanced-security/code-security |
| Secret protectionStop leaks before they start | https://github.com/security/advanced-security/secret-protection |
| Why GitHub | https://github.com/why-github |
| Documentation | https://docs.github.com |
| Blog | https://github.blog |
| Changelog | https://github.blog/changelog |
| Marketplace | https://github.com/marketplace |
| View all features | https://github.com/features |
| Enterprises | https://github.com/enterprise |
| Small and medium teams | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| App Modernization | https://github.com/solutions/use-case/app-modernization |
| DevSecOps | https://github.com/solutions/use-case/devsecops |
| DevOps | https://github.com/solutions/use-case/devops |
| CI/CD | https://github.com/solutions/use-case/ci-cd |
| View all use cases | https://github.com/solutions/use-case |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| View all industries | https://github.com/solutions/industry |
| View all solutions | https://github.com/solutions |
| AI | https://github.com/resources/articles?topic=ai |
| Software Development | https://github.com/resources/articles?topic=software-development |
| DevOps | https://github.com/resources/articles?topic=devops |
| Security | https://github.com/resources/articles?topic=security |
| View all topics | https://github.com/resources/articles |
| Customer stories | https://github.com/customer-stories |
| Events & webinars | https://github.com/resources/events |
| Ebooks & reports | https://github.com/resources/whitepapers |
| Business insights | https://github.com/solutions/executive-insights |
| GitHub Skills | https://skills.github.com |
| Documentation | https://docs.github.com |
| Customer support | https://support.github.com |
| Community forum | https://github.com/orgs/community/discussions |
| Trust center | https://github.com/trust-center |
| Partners | https://github.com/partners |
| GitHub SponsorsFund open source developers | https://github.com/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/accelerator |
| Archive Program | https://archiveprogram.github.com |
| Topics | https://github.com/topics |
| Trending | https://github.com/trending |
| Collections | https://github.com/collections |
| Enterprise platformAI-powered developer platform | https://github.com/enterprise |
| GitHub Advanced SecurityEnterprise-grade security features | https://github.com/security/advanced-security |
| Copilot for BusinessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/premium-support |
| Pricing | https://github.com/pricing |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
|
Sign in
| https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FSQLauto%2FDBBestPractices |
|
Sign up
| https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=SQLauto%2FDBBestPractices |
| Reload | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices |
| Reload | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices |
| Reload | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices |
|
SQLauto
| https://patch-diff.githubusercontent.com/SQLauto |
| DBBestPractices | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices |
| kevinmartintech/SQL-Server-Database-Development-Best-Practices | https://patch-diff.githubusercontent.com/kevinmartintech/SQL-Server-Database-Development-Best-Practices |
|
Notifications
| https://patch-diff.githubusercontent.com/login?return_to=%2FSQLauto%2FDBBestPractices |
|
Fork
0
| https://patch-diff.githubusercontent.com/login?return_to=%2FSQLauto%2FDBBestPractices |
|
Star
0
| https://patch-diff.githubusercontent.com/login?return_to=%2FSQLauto%2FDBBestPractices |
|
MIT license
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/LICENSE |
|
0
stars
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/stargazers |
|
1
fork
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/forks |
|
Branches
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/branches |
|
Tags
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/tags |
|
Activity
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/activity |
|
Star
| https://patch-diff.githubusercontent.com/login?return_to=%2FSQLauto%2FDBBestPractices |
|
Notifications
| https://patch-diff.githubusercontent.com/login?return_to=%2FSQLauto%2FDBBestPractices |
|
Code
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices |
|
Pull requests
0
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/pulls |
|
Actions
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/actions |
|
Projects
0
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/projects |
|
Security
0
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/security |
|
Insights
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/pulse |
|
Code
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices |
|
Pull requests
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/pulls |
|
Actions
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/actions |
|
Projects
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/projects |
|
Security
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/security |
|
Insights
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/pulse |
| Branches | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/branches |
| Tags | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/tags |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/branches |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/tags |
| 2 Commits | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/commits/main/ |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/commits/main/ |
| LICENSE | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/LICENSE |
| LICENSE | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/LICENSE |
| README.md | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/README.md |
| README.md | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/README.md |
| README | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices |
| License | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#naming-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#common-database-object-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#prefix-naming |
| Additional Scenarios that lead to compile locks (2. Stored procedure is prefixed with sp_) | https://docs.microsoft.com/en-us/troubleshoot/sql/performance/troubleshoot-blocking-caused-compile-locks#additional-scenarios-that-lead-to-compile-locks:~:text=Stored%20procedure%20is%20prefixed%20with%20sp_ |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#plural-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#pascalcase-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#reserved-word-naming |
| Reserved Keywords | https://docs.microsoft.com/en-us/sql/t-sql/language-elements/reserved-keywords-transact-sql |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#special-character-naming |
| Use PascalCase | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#use-pascalcase |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#abbreviation-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#numbers-in-names |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#schema-naming |
| SQL Server Best Practices – Implementation of Database Object Schemas | https://learn.microsoft.com/en-us/previous-versions/sql/sql-server-2008/dd283095(v=sql.100) |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#schema-naming-examples |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#table-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#look-up-table-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#address-type-sample-table |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#concatenating-two-table-names-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#column-naming-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#column-naming-to-reflect-attributes-precisely |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#column-naming-to-avoid-repeating-table-names |
| Primary Key Column Naming | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#primary-key-column-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#column-naming-for-abbreviations |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#column-naming-for-common-or-natural-words-or-terms |
| Affirmative Boolean Naming | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#affirmative-boolean-naming |
| URL or URI Naming | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#url-or-uri-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#primary-key-column-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#foreign-key-column-naming |
| Primary Key Column Naming | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#primary-key-column-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#affirmative-boolean-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#affirmative-boolean-naming-examples |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#url-or-uri-naming |
| The Difference Between a URL, URI, and a URN | https://danielmiessler.com/study/difference-between-uri-url |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#foreign-key-relationship-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#parameter-and-variable-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#index-naming |
| uniqueidentifier in a Clustered Index | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#uniqueidentifier-in-a-clustered-index-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#primary-key-clustered-index-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#natural-key-naming |
| Unique Indexes | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#unique-indexes |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#constraint-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#default-column-constraint-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#column-check-constraint-naming |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#unique-column-constraint-naming |
| Unique Indexes | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#unique-indexes |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#system-generated-naming |
| Naming Constraint Usage | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/naming-conventions#naming-constraint-usage |
| Naming Primary Keys | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/naming-conventions#naming-primary-keys |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#views |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#stored-procedures |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#functions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#triggers |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#user-defined-data-types |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#variables |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#table-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#create-an-inline-index-convention |
| https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql?view=sql-server-ver16#u-create-an-inline-index | https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql?view=sql-server-ver16#u-create-an-inline-index |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#table-normal-form-convention |
| Database Normalizing | https://en.wikipedia.org/wiki/Database_normalization |
| Boyce–Codd normal form (BCNF or 3.5NF) | https://en.wikipedia.org/wiki/Boyce%E2%80%93Codd_normal_form |
| Keeping Denormalized Values Correct | http://database-programmer.blogspot.com/2008/11/keeping-denormalized-values-correct.html |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#table-inheritance-type-convention |
| Table Per Type (TPT) | https://entityframework.net/tpt |
| Table Per Concrete (TPC) | https://entityframework.net/tpc |
| Table Per Hierarchy (TPH) | https://entityframework.net/tph |
| Table Per Type (TPT) | https://entityframework.net/tpt |
| Not Normalizing Tables | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#not-normalizing-tables |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#table-entity-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#table-entity-use-case-exception |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#weak-or-strong-table-entity-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#system-versioned-temporal-tables-compression-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#table-partition-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#entity-attribute-value-convention |
| Entity–Attribute–Value (EAV) model | https://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model |
| Inner-platform effect | https://en.wikipedia.org/wiki/Inner-platform_effect |
| anti-pattern | https://en.wikipedia.org/wiki/Anti-pattern |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#entity-attribute-value-use-case-exceptions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#column-conventions |
| Data Type Conventions | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#data-type-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#primary-key-convention |
| Primary Key Column Naming | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#primary-key-column-naming |
| https://camo.githubusercontent.com/df1c20ab99c09547af75a0b99a00c6fd4d333cf69da795a68348deb6c301a4cf/68747470733a2f2f656d657267656e74736f6674776172652e6769746875622e696f2f53514c2d5365727665722d446576656c6f706d656e742d4173736573736d656e742f496d616765732f554e495155454944454e5449464945525f466f725f5072696d6172795f4b65792e706e67 |
| uniqueidentifier in a Clustered Index | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#uniqueidentifier-in-a-clustered-index-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#nullable-columns-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#nullable-columns-and-join-elimination |
| Untrusted Foreign Key | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#untrusted-foreign-key |
| https://camo.githubusercontent.com/96969d24d0e607cf29d4324a8f3ed2e06d0ea44f1ce18bdad9558ac05f30ed18/68747470733a2f2f656d657267656e74736f6674776172652e6769746875622e696f2f53514c2d5365727665722d446576656c6f706d656e742d4173736573736d656e742f496d616765732f4a4f494e5f456c696d696e6174696f6e5f4e4f545f4e554c4c2e706e67 |
| https://camo.githubusercontent.com/9d779b90486f1e070967769c57b1275c46c6fb255c969a7f2affa32c7bb124f0/68747470733a2f2f656d657267656e74736f6674776172652e6769746875622e696f2f53514c2d5365727665722d446576656c6f706d656e742d4173736573736d656e742f496d616765732f4a4f494e5f456c696d696e6174696f6e5f4e554c4c2e706e67 |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#specify-null-or-not-null-option-for-columns-convention |
| Untrusted Foreign Key | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#untrusted-foreign-key |
| https://camo.githubusercontent.com/96969d24d0e607cf29d4324a8f3ed2e06d0ea44f1ce18bdad9558ac05f30ed18/68747470733a2f2f656d657267656e74736f6674776172652e6769746875622e696f2f53514c2d5365727665722d446576656c6f706d656e742d4173736573736d656e742f496d616765732f4a4f494e5f456c696d696e6174696f6e5f4e4f545f4e554c4c2e706e67 |
| https://camo.githubusercontent.com/9d779b90486f1e070967769c57b1275c46c6fb255c969a7f2affa32c7bb124f0/68747470733a2f2f656d657267656e74736f6674776172652e6769746875622e696f2f53514c2d5365727665722d446576656c6f706d656e742d4173736573736d656e742f496d616765732f4a4f494e5f456c696d696e6174696f6e5f4e554c4c2e706e67 |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#column-collation-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#foreign-key-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#foreign-key-index-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#cascading-actions-on-foreign-keys-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#index-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#using-missing-indexes-recommendations |
| Books Online: Limitations of the Missing Indexes Feature | http://msdn.microsoft.com/en-us/library/ms345485(v=sql.105).aspx |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#specify-ascending-or-descending-for-indexes-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#disabling-indexes-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#filter-columns-in-indexes-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#clustered-index-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#index-fill-factor-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#filter-columns-in-index-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#uniqueidentifier-in-a-clustered-index-convention |
| Ola Hallengren maintenance scripts | https://ola.hallengren.com/ |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#unique-index-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#constraint-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#untrusted-foreign-key-or-check-constraints |
| If you don't specify, WITH CHECK is assumed for new constraints, and WITH NOCHECK is assumed for re-enabled constraints | https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-table-transact-sql?redirectedfrom=MSDN&view=sql-server-ver16#with-check--with-nocheck |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#disabled-check-constraint-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#data-type-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#data-type-length-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#always-specify-lengths-for-a-data-type-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#variable-length-that-are-size-1-or-2-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#matching-data-types-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#deprecated-data-types-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#sysname-data-type-convention |
| Microsoft docs | https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008/ms191240(v=sql.100)?redirectedfrom=MSDN#:~:text=The%20sysname%20data%20type%20is%20used%20for%20table%20columns%2C%20variables%2C%20and%20stored%20procedure%20parameters%20that%20store%20object%20names. |
| Back to top | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#top |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#nvarcharmax-data-type-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#boolean-data-type-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#scientific-data-type-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#variant-data-type-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#user-defined-data-type-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#time-zone-aware-data-type-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#date-and-time-data-type-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#money-data-type-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#unicode-national-language-character-set-data-type-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#email-address-convention |
| There is a restriction in RFC 2821 on the length of an address in MAIL and RCPT commands of 254 characters. Since addresses that do not fit in those fields are not normally useful, the upper limit on address lengths should normally be considered to be 254. | https://www.rfc-editor.org/errata_search.php?rfc=3696&eid=1690#:~:text=there%20is%20a%20restriction%20in%20RFC%202821%20on%20the%20length%20of%20an%0A%20%20%20address%20in%20MAIL%20and%20RCPT%20commands%20of%20254%20characters.%20%20Since%20addresses%0A%20%20%20that%20do%20not%20fit%20in%20those%20fields%20are%20not%20normally%20useful%2C%20the%20upper%0A%20%20%20limit%20on%20address%20lengths%20should%20normally%20be%20considered%20to%20be%20254. |
| submitted erratum | https://www.rfc-editor.org/errata_search.php?rfc=3696&eid=1690 |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#url-convention |
| RFC 7231, section 6.5.12: 414 URI Too Long | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.12 |
| URL or URI Naming | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/naming-conventions#url-or-uri-naming |
| Maximum URL length is 2,083 characters in Internet Explorer | https://support.microsoft.com/en-us/topic/maximum-url-length-is-2-083-characters-in-internet-explorer-174e7c8a-6666-f4e0-6fd6-908b53c12246 |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#coding-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#source-control-convention |
| Redgate SQL Source Control | https://www.red-gate.com/products/sql-development/sql-source-control/ |
| SQL Server Data Tools | https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt |
| monorepo | https://en.wikipedia.org/wiki/Monorepo |
| monorepo | https://en.wikipedia.org/wiki/Monorepo |
| Should the Database and Application projects be in the same Repository? | https://eitanblumin.com/2022/07/05/should-the-database-and-application-projects-be-in-the-same-repository |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#environments-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#deprecated-or-discontinued-feature-convention |
| Deprecated database engine features in SQL Server 2022 | https://learn.microsoft.com/en-us/sql/database-engine/deprecated-database-engine-features-in-sql-server-2022 |
| Discontinued features in SQL Server 2022 | https://learn.microsoft.com/en-us/sql/database-engine/discontinued-database-engine-functionality-in-sql-server?view=sql-server-ver16#:~:text=in%20SQL%20Server.-,Discontinued%20features%20in%20SQL%20Server%202022 |
| Deprecated database engine features in SQL Server 2019 | https://docs.microsoft.com/en-us/sql/database-engine/deprecated-database-engine-features-in-sql-server-version-15?view=sql-server-ver15 |
| Discontinued features in SQL Server 2019 | https://learn.microsoft.com/cs-cz/sql/database-engine/discontinued-database-engine-functionality-in-sql-server?view=sql-server-ver16#:~:text=adls-,Discontinued%20features%20in%20SQL%20Server%202019 |
| Deprecated Database Engine Features in SQL Server 2017 | https://docs.microsoft.com/en-us/sql/database-engine/deprecated-database-engine-features-in-sql-server-2017?view=sql-server-ver15 |
| Deprecated Database Engine Features in SQL Server 2016 | https://docs.microsoft.com/en-us/sql/database-engine/deprecated-database-engine-features-in-sql-server-2016?view=sql-server-ver15 |
| Discontinued features in SQL Server 2016 | https://learn.microsoft.com/en-us/sql/database-engine/discontinued-database-engine-functionality-in-sql-server?view=sql-server-ver15#discontinued-features-in--2:~:text=2017%20(14.x).-,Discontinued%20features%20in%20SQL%20Server%202016 |
| Discontinued Database Engine Functionality in SQL Server 2014 | https://docs.microsoft.com/en-us/previous-versions/sql/2014/database-engine/discontinued-database-engine-functionality-in-sql-server-2016?view=sql-server-2014&preserve-view=true |
| Discontinued Features in SQL Server 2012 | https://docs.microsoft.com/en-us/previous-versions/sql/2014/database-engine/discontinued-database-engine-functionality-in-sql-server-2016?view=sql-server-2014&preserve-view=true#Denali |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#orm-vs-stored-procedures-convention |
| sp_CRUDGen | https://github.com/kevinmartintech/sp_CRUDGen |
| Database-First: Stored Procedure in Entity Framework | https://www.entityframeworktutorial.net/stored-procedure-in-entity-framework.aspx |
| Simple C# Data Access with Dapper and SQL - Minimal API Project Part 1 | https://www.youtube.com/watch?v=dwMFg6uxQ0I |
| Simple C# Data Access with Dapper and SQL - Minimal API Project Part 2 | https://www.youtube.com/watch?v=5tYSO5mAjXs |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#begin-end-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#if-statements |
| Not Using Semicolon to Terminate Statements | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#not-using-semicolon-to-terminate-statements |
| Not Using Semicolon THROW | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#not-using-semicolon-throw |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#stored-procedures-1 |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#using-set-nocount-on-in-stored-procedure-or-trigger-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#using-nolock-read-uncommitted-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#select-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#using-select-distinct-group-by-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#from-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#using-table-alias-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#using-hints-convention |
| table hints | https://docs.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-table |
| query hints | https://learn.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-query |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#where-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#non-sargable-expression-in-a-where-clause-convention |
| https://camo.githubusercontent.com/2a2c263e5e1013b86f2de02adc3bab711af537e52b4a20ea1234013b7b732ef3/68747470733a2f2f656d657267656e74736f6674776172652e6769746875622e696f2f53514c2d5365727665722d446576656c6f706d656e742d4173736573736d656e742f496d616765732f5573696e675f615f4e6f6e2d5341524761626c655f45787072657373696f6e5f696e5f615f57484552455f436c617573652e706e67 |
| Using Missing Indexes Recommendations | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#using-missing-indexes-recommendations |
| https://camo.githubusercontent.com/64a7ccfed6d9fc61d7341a484b7cc4f48bfb052ef5966e9d2f4c035ea587587f/68747470733a2f2f656d657267656e74736f6674776172652e6769746875622e696f2f53514c2d5365727665722d446576656c6f706d656e742d4173736573736d656e742f496d616765732f4e6f6e2d5341524761626c655f446f65735f4e6f745f4765745f496e6465785f5265636f6d6d656e646174696f6e2e706e67 |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#order-by-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#order-by-usage-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#specify-ascending-or-descending-for-order-by-clause-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#using-column-number-in-order-by-convention |
| Back to top | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#top |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#execution-plan-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#query-parameterization-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#filter-a-nullable-column-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#data-existing-or-not-existing-or-in-or-not-in-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#using-percent-at-the-start-of-like-predicate-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#index-on-where-clause-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#index-on-in-columns-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#using-not-in-in-the-where-clause-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#converting-dates-to-string-to-compare-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#todo-json-explicit-schema |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#todo-json-performance |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#todo-insert |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#transaction-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#using-transaction-convention |
| atomic | https://en.wikipedia.org/wiki/Atomicity_(database_systems) |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#using-set-xact_abort-on-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#here-is-a-basic-transaction-pattern |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#here-is-a-transaction-pattern-with-a-custom-throw-error |
| Not Using SET XACT_ABORT ON | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#not-using-set-xact_abort-on |
| Not Using BEGIN END | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#not-using-begin-end |
| Not Using Semicolon THROW | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#not-using-semicolon-throw |
| Using RAISERROR Instead of THROW | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#using-raiserror-instead-of-throw |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#implicit-transactions-convention |
| IMPLICIT_TRANSACTIONS ON not popular | https://docs.microsoft.com/en-us/sql/t-sql/statements/set-implicit-transactions-transact-sql?view=sql-server-ver15#:~:text=IMPLICIT_TRANSACTIONS%20ON%20is%20not%20popular |
| Transaction locking and row versioning guide | https://docs.microsoft.com/en-us/sql/relational-databases/sql-server-transaction-locking-and-row-versioning-guide |
| Implicit Transactions | https://docs.microsoft.com/en-us/sql/relational-databases/sql-server-transaction-locking-and-row-versioning-guide?view=sql-server-ver15#:~:text=and%20DB%2DLibrary.-,Implicit%20Transactions,-When%20a%20connection |
| SET IMPLICIT_TRANSACTIONS ON Is One Hell of a Bad Idea | https://www.brentozar.com/archive/2018/02/set-implicit_transactions-one-hell-bad-idea |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#upsert-pattern-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#use-this-upsert-pattern-when-a-record-update-is-more-likely |
| sp_CRUDGen | https://github.com/kevinmartintech/sp_CRUDGen |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#use-this-upsert-pattern-to-allow-the-client-application-to-handle-the-exception |
| table-valued parameter | https://docs.microsoft.com/en-us/sql/relational-databases/tables/use-table-valued-parameters-database-engine?view=sql-server-ver15 |
| JSON | https://docs.microsoft.com/en-us/sql/relational-databases/json/convert-json-data-to-rows-and-columns-with-openjson-sql-server?view=sql-server-ver15 |
| XML | https://docs.microsoft.com/en-us/sql/t-sql/xml/nodes-method-xml-data-type?view=sql-server-ver15 |
| comma-separated list | https://docs.microsoft.com/en-us/sql/t-sql/functions/string-split-transact-sql?view=sql-server-ver15 |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#this-upsert-pattern-can-be-problematic |
| What To Avoid If You Want To Use MERGE | https://michaeljswart.com/2021/08/what-to-avoid-if-you-want-to-use-merge/#:~:text=So%20just%20to,MERGE |
| Use Caution with SQL Server's MERGE Statement | https://www.mssqltips.com/sqlservertip/3074/use-caution-with-sql-servers-merge-statement/#:~:text=function%20as%20expected.-,Conclusion,-I%20am%20not |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#upsert-use-case-exception |
| Back to top | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#top |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#cursor-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#cursor-overview |
| Using WHILE Loop | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#using-while-loop |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#cursor-valid-use-cases |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#cursor-type |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#full-cursor-syntax |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#while-loop-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#temporary-tables-and-table-variables-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#parameter-or-variable-data-type-matching-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#when-to-breakdown-complex-queries |
| When To Break Down Complex Queries | https://docs.microsoft.com/en-us/archive/blogs/sqlcat/when-to-break-down-complex-queries |
| When To Break Down Complex Queries | https://docs.microsoft.com/en-us/archive/blogs/sqlcat/when-to-break-down-complex-queries |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#breakdown-or-logic-in-the-where-clause |
| Problematic Use of OR | https://docs.microsoft.com/en-us/archive/blogs/sqlcat/when-to-break-down-complex-queries#problematic-use-of-or |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#breakdown-aggregations-in-intermediate-results-sets |
| Query Anti-Pattern 2: Aggregations in Intermediate Result Sets | https://docs.microsoft.com/en-us/archive/blogs/sqlcat/when-to-break-down-complex-queries#:~:text=Query%20Anti%2DPattern%202%3A%20Aggregations%20in%20Intermediate%20Result%20Sets |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#breakdown-a-large-number-of-very-complex-joins |
| Other Query Types to Break Down | https://docs.microsoft.com/en-us/archive/blogs/sqlcat/when-to-break-down-complex-queries#:~:text=A%20query%20with%20a%20large%20number%20of%20very%20complex%20joins |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#breakdown-a-case-clause-in-the-where-or-join-clause |
| Other Query Types to Break Down | https://docs.microsoft.com/en-us/archive/blogs/sqlcat/when-to-break-down-complex-queries#:~:text=%C2%B7-,A%20CASE%20clause%20in%20the%20WHERE%20or%20JOIN%20clause,-This%20case%20refers |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#sql-injection-risk-convention |
| SQL Injection | https://docs.microsoft.com/en-us/sql/relational-databases/security/sql-injection |
| Using EXECUTE | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#using-execute |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#dynamic-search-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#dynamic-search-if-branches-are-not-a-viable-fix |
| Dynamic Search Conditions in T‑SQL | http://www.sommarskog.se/dyn-search-2008.html |
| sp_CRUDGen | https://github.com/kevinmartintech/sp_CRUDGen |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#range-instead-of-rows-convention |
| What is the Difference between ROWS and RANGE? | https://auntkathisql.com/2014/09/27/what-is-the-difference-between-rows-and-range |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#common-table-expression-cte-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#join-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#correlated-subqueries-instead-of-joins-convention |
| SQL Server Uncorrelated and Correlated Subquery | https://www.mssqltips.com/sqlservertip/6037/sql-server-uncorrelated-and-correlated-subquery/ |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#mixed-data-types-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/.attachments/Mixing_Data_Types_in_JOIN_or_WHERE_Clauses-7173be1c-f67e-4d0d-af23-1a42eefc7865.png |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#formatting-conventions |
| Team Collapsed | https://github.com/EmergentSoftware/SQL-Server-Development-Assessment/tree/master/Development%20Application%20Settings/Red%20Gate/SQL%20Prompt/Styles |
| Team Expanded | https://github.com/EmergentSoftware/SQL-Server-Development-Assessment/tree/master/Development%20Application%20Settings/Red%20Gate/SQL%20Prompt/Styles |
| RedGate SQL Server Prompt | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/development-app-settings#redgate-sql-server-prompt |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#semicolon-to-terminate-statements-convention |
| See Microsoft Docs | https://docs.microsoft.com/en-us/sql/database-engine/deprecated-database-engine-features-in-sql-server-version-15?view=sql-server-ver15#:~:text=For%20new%20development%20work%2C%20do%20not%20use%20deprecated%20features.%20For%20existing%20aplications%2C%20plan%20to%20modify%20applications%20that%20currently%20use%20these%20features%20as%20soon%20as%20possible. |
| Using Deprecated or Discontinued Feature | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#using-deprecated-or-discontinued-feature |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#using-brackets-convention |
| Removing the Square Bracket Decorations with SQL Prompt | https://www.red-gate.com/hub/product-learning/sql-prompt/removing-the-square-bracket-decorations-with-sql-prompt |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#converting-to-unicode-convention |
| Using a Non-SARGable Expression in a WHERE Clause | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#using-a-non-sargable-expression-in-a-where-clause |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#keyword-abbreviation-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#function-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#scalar-function-convention |
| Inlineable scalar UDFs requirements | https://docs.microsoft.com/en-us/sql/relational-databases/user-defined-functions/scalar-udf-inlining?view=sql-server-ver15#inlineable-scalar-udfs-requirements |
| Refactor SQL Server scalar UDF to inline TVF to improve performance | https://www.mssqltips.com/sqlservertip/4772/refactor-sql-server-scalar-udf-to-inline-tvf-to-improve-performance/ |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#scalar-function-not-inlineable-convention |
| Inlineable scalar UDFs requirements | https://docs.microsoft.com/en-us/sql/relational-databases/user-defined-functions/scalar-udf-inlining?view=sql-server-ver15#inlineable-scalar-udfs-requirements |
| 05c Blueprint Functions Scalar Function Rewrites Demo video by Erik Darling | https://www.erikdarlingdata.com/sql-server/software-vendor-mistakes-with-sql-server-not-using-inline-table-valued-functions/?mc_cid=e0205e6bac&mc_eid=90079896ec#:~:text=In%20the%20videos%20below%2C%20I%E2%80%99m%20going%20to%20show%20you%20how%20to%20rewrite%20T%2DSQL%20Scalar%20User%20Defined%20Functions%2C%20and%20a%20really%20cool%20thing%20they%20can%20do%20on%20top%20of%20just%20replacing%20the%20bad%20kinds%20of%20functions. |
| Inlineable scalar UDFs requirements | https://docs.microsoft.com/en-us/sql/relational-databases/user-defined-functions/scalar-udf-inlining?view=sql-server-ver15#inlineable-scalar-udfs-requirements |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#isnumeric-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#coalesce-vs-isnull-convention |
| Microsoft Docs: Comparing COALESCE and ISNULL | https://docs.microsoft.com/en-us/sql/t-sql/language-elements/coalesce-transact-sql?view=sql-server-ver15#comparing-coalesce-and-isnull |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#string-trim-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#execute-t-sql-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#find-the-length-of-a-string-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#string-comparing-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#parentheses-use-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#todo-setting-the-nocount-option |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#todo-code-commenting |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#todo-unicode-vs-non-unicode-data-types |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#todo-data-access-and-transactions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#error-handling-conventions |
| New applications should use the THROW methodologies | https://docs.microsoft.com/en-us/sql/t-sql/language-elements/raiserror-transact-sql?redirectedfrom=MSDN#:~:text=New%20applications%20should%20use%20THROW%20instead. |
| Using RAISERROR Instead of THROW | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#using-raiserror-instead-of-throw |
| Not Using Transactions | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#not-using-transactions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#throw-methodology-dbotestthrow |
| THROW | https://docs.microsoft.com/en-us/sql/t-sql/language-elements/throw-transact-sql |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#return-code-methodology-dbotestreturncode |
| RETURN | https://docs.microsoft.com/en-us/sql/t-sql/language-elements/return-transact-sql |
| RAISERROR | https://docs.microsoft.com/en-us/sql/t-sql/language-elements/raiserror-transact-sql |
| Using RAISERROR Instead of THROW | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#using-raiserror-instead-of-throw |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#output-parameter-methodology-dbotestreturncodeparameter |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#raiserror-methodology-dbotestraiserror |
| New applications should use THROW instead of RAISERROR | https://docs.microsoft.com/en-us/sql/t-sql/language-elements/raiserror-transact-sql?redirectedfrom=MSDN#:~:text=New%20applications%20should%20use%20THROW%20instead. |
| Using RAISERROR Instead of THROW | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#using-raiserror-instead-of-throw |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#using-raiserror-instead-of-throw |
| New applications should use THROW instead of RAISERROR | https://docs.microsoft.com/en-us/sql/t-sql/language-elements/raiserror-transact-sql?redirectedfrom=MSDN#:~:text=New%20applications%20should%20use%20THROW%20instead. |
| Not Using SET XACT_ABORT ON | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#not-using-set-xact_abort-on |
| Not Using Transactions | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#not-using-transactions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#throw-formating-convention |
| Not Using BEGIN END | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#not-using-begin-end |
| Not Using Semicolon to Terminate Statements | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/SQL-Server-Development-Assessment/best-practices-and-potential-findings/sql-code-conventions#not-using-semicolon-to-terminate-statements |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#todo-foreign-key-and-check-constraints |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#todo-parameter-sniffing |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#execution-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#calculated-total-or-balance-value-for-a-result-set |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/.attachments/image-d8aa5f26-05c8-4185-a0b0-bc43143468d3.png |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#calculated-total-or-balance-value-for-a-search-parameter |
| transaction processing (OLTP) | https://learn.microsoft.com/en-us/azure/architecture/data-guide/relational-data/online-transaction-processing |
| analytical processing (OLAP) | https://learn.microsoft.com/en-us/azure/architecture/data-guide/relational-data/online-analytical-processing |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/.attachments/image-642c0f11-6ac7-46dd-a0d6-1dc5c42a0184.png |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/.attachments/image-7983c310-025c-443d-8e11-849a673214de.png |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/.attachments/image-8413e0d2-1fc4-4160-8e7e-2f43da422b5d.png |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/.attachments/image-5a9a8a78-71f4-47c0-8ded-9fae43ebbe83.png |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/blob/main/.attachments/image-a85076d1-c5dc-4d1f-bbe6-08d8cd312ff6.png |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#data-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#data-encryption-convention |
| personal data | https://en.wikipedia.org/wiki/Personal_data |
| PII | https://en.wikipedia.org/wiki/PII |
| PHI | https://en.wikipedia.org/wiki/Protected_health_information |
| SQL Server Always Encrypt | https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/always-encrypted-database-engine |
| SQL Server Transparent Data Encryption (TDE) | https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/transparent-data-encryption |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#placeholder-rows-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#configuration-conventions |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#database-and-database-object-collation-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#connection-string-convention |
| Specifying Application Intent | https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/sqlclient-support-for-high-availability-disaster-recovery#specifying-application-intent |
| Connecting With MultiSubnetFailover | https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/sqlclient-support-for-high-availability-disaster-recovery#connecting-with-multisubnetfailover |
| Specifying Application Intent | https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/sqlclient-support-for-high-availability-disaster-recovery#specifying-application-intent |
| Connecting With MultiSubnetFailover | https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/sqlclient-support-for-high-availability-disaster-recovery#connecting-with-multisubnetfailover |
| Specifying Application Intent | https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/sqlclient-support-for-high-availability-disaster-recovery#specifying-application-intent |
| Connecting With MultiSubnetFailover | https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/sqlclient-support-for-high-availability-disaster-recovery#connecting-with-multisubnetfailover |
| Not Using Code Retry Logic for Transient Errors | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#code-retry-logic-for-transient-errors-convention |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#code-retry-logic-for-transient-errors-convention |
| .NET SqlConnection parameters for connection retry | https://docs.microsoft.com/en-us/azure/azure-sql/database/troubleshoot-common-connectivity-issues#net-sqlconnection-parameters-for-connection-retry |
| Troubleshoot transient connection errors in SQL Database and SQL Managed Instance | https://docs.microsoft.com/en-us/azure/azure-sql/database/troubleshoot-common-connectivity-issues |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#contained-database-user-convention |
| Contained Database Users - Making Your Database Portable | https://docs.microsoft.com/en-us/sql/relational-databases/security/contained-database-users-making-your-database-portable?view=sql-server-ver15 |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#application-user-role-convention |
| Principle of least privilege | https://en.wikipedia.org/wiki/Principle_of_least_privilege |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#query-execution-defaults-convention |
| Considerations When You Use the SET Statement | https://docs.microsoft.com/en-us/sql/t-sql/statements/set-statements-transact-sql#considerations-when-you-use-the-set-statements |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#ssms-sql-server-management-studio-and-visual-studio-settings |
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#visual-studio-database-projects |
| SET Statements | https://docs.microsoft.com/en-us/sql/t-sql/statements/set-statements-transact-sql |
| SET ANSI_DEFAULTS (Transact-SQL) | https://docs.microsoft.com/en-us/sql/t-sql/statements/set-ansi-defaults-transact-sql |
|
Readme
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#readme-ov-file |
|
MIT license
| https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices#MIT-1-ov-file |
| Please reload this page | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices |
|
Activity | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/activity |
|
Custom properties | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/custom-properties |
|
0
stars | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/stargazers |
|
0
watching | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/watchers |
|
0
forks | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/forks |
|
Report repository
| https://patch-diff.githubusercontent.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2FSQLauto%2FDBBestPractices&report=SQLauto+%28user%29 |
| Releases | https://patch-diff.githubusercontent.com/SQLauto/DBBestPractices/releases |
| Packages
0 | https://patch-diff.githubusercontent.com/orgs/SQLauto/packages?repo_name=DBBestPractices |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |