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
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,8 +211,9 @@ This is only recommendations! But it is consistent for choosing only 1 function
211
211
|[`GETDATE`]|[`SYSUTCDATETIME`]| Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. |[25]|
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
-
|[`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
-
|[`DATETIMEFROMPARTS`]|[`DATETIME2FROMPARTS`]| 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]|
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
+
|[`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]|
216
217
|[`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]|
217
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]|
218
219
@@ -243,7 +244,10 @@ This is only recommendations! But it is consistent for choosing only 1 function
0 commit comments