You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SQL Server Name Convention and T-SQL Programming Style.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -467,7 +467,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines.
467
467
- Do not use a scalar user-defined function (UDF) in a `JOIN` condition, `WHERE` search condition, or in a `SELECT` list, unless the function is [schema-bound](https://docs.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql#best-practices).
468
468
More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/misuse-scalar-user-defined-function-constant-pe017).
469
469
- For scalar function use [`WITH SCHEMABINDING`](https://docs.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql#best-practices) option to get a performance boost. More details [here](https://bertwagner.com/2018/12/04/two-words-for-faster-scalar-functions/)
470
-
- <ahref="information-schema"></a> Do not use [`INFORMATION_SCHEMA`] views to determine the schema of an object. [`INFORMATION_SCHEMA`] views only represent a **subset of the metadata** of an object.
470
+
- <aid="information-schema"></a> Do not use [`INFORMATION_SCHEMA`] views to determine the schema of an object. [`INFORMATION_SCHEMA`] views only represent a **subset of the metadata** of an object.
471
471
The only reliable way to find the schema of a object is to query the [`sys.objects`](https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-objects-transact-sql) catalog view. [`INFORMATION_SCHEMA`] does not represent every possible state of the objects in SQL. For example, [`filtered indexes`](https://docs.microsoft.com/en-us/sql/relational-databases/indexes/create-filtered-indexes). The [`INFORMATION_SCHEMA`] are incomplete.
472
472
More details [here](https://github.com/MicrosoftDocs/sql-docs/issues/4188).
473
473
- Do not use explicit transactions for DML and DDL especially for reorganize index because the locking behavior of this statemnets becomes more restrictive.
@@ -492,7 +492,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines.
492
492
SELECT @nvcmaxVariable;
493
493
```
494
494
More details [here](https://themondaymorningdba.wordpress.com/2018/09/13/them-concatenatin-blues/).
495
-
- <ahref="data-type-length"></a> Always specify a length to any text-based data type such as `varchar`, `nvarchar`, `char`, `nchar`:
495
+
- <aid="data-type-length"></a> Always specify a length to any text-based data type such as `varchar`, `nvarchar`, `char`, `nchar`:
0 commit comments