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
+7-4
Original file line number
Diff line number
Diff line change
@@ -212,10 +212,9 @@ This is only recommendations! But it is consistent for choosing only 1 function
212
212
|[`GETUTCDATE`]|[`SYSUTCDATETIME`]| Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. |[25]|
213
213
|[`SYSDATETIME`]|[`SYSUTCDATETIME`]| Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. |[25]|
214
214
|[`CURRENT_TIMESTAMP`]|[`SYSUTCDATETIME`]| It's too similar to the poorly-named TIMESTAMP data type, which has nothing to do with dates and times and should be called `ROWVERSION`. |[26]|
215
-
|[`DATETFROMPARTS`]|[`DATET2FROMPARTS`]| The `datetime` data type returns a value to the nearest three milliseconds, as long as it ends with 0, 3, and 7. This is data corruption by definition. |[26]|
216
215
|[`DATETIMEFROMPARTS`]|[`DATETIME2FROMPARTS`]| The `datetime` data type returns a value to the nearest three milliseconds, as long as it ends with 0, 3, and 7. This is data corruption by definition. |[26]|
217
216
|[`ISDATE`]|[`TRY_CONVERT`]|`ISNUMERIC` can often lead to data type conversion errors, when importing data. For SQL Server below 2012 use `WHERE` with `LIKE`. |[26]|
218
-
|[`BETWEEN`]|`>=` and `<=`| Always use an open-ended range to prevent erroneously including or excluding rows. It's much less complex to find the beginning of the next period than the end of the current period. |[27]|
217
+
|[`BETWEEN`]|[`>=`] and [`<=`]| Always use an open-ended range to prevent erroneously including or excluding rows. It's much less complex to find the beginning of the next period than the end of the current period. |[27]|
@@ -344,7 +347,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines.
344
347
`INFORMATION_SCHEMA` views only represent a subset of the metadata of an object. The only reliable way to find the schema of a object is to query the `sys.objects` catalog view.
345
348
- When more than one logical operator is used always use parentheses, even when they are not required.
346
349
This can improve the readability of queries, and reduce the chance of making a subtle mistake because of operator precedence.
347
-
There is no significant performance penalty in using parentheses. More details [here](https://docs.microsoft.com/en-us/sql/relational-databases/query-processing-architecture-guide?view=sql-server-ver15#logical-operator-precedence).
350
+
There is no significant performance penalty in using parentheses. More details [here](https://docs.microsoft.com/en-us/sql/relational-databases/query-processing-architecture-guide#logical-operator-precedence).
0 commit comments