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
|[`!=`][12]|[`<>`][12]|`<>` is [`ANSI`], `!=` not `ANSI`, [`<>` and `!=` are identical][13]|[13]|
207
-
|[`CONVERT`][10]|[`CAST`][10]|`CAST` is [`ANSI`]|[14],[15]|
208
-
|[`ISNULL`]|[`COALECSE`]|`COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour with possibility to implicit triming string |[16],[17]|
209
-
|[`DATEDIFF`]|[`DATEADD`]| The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`]|[18],[19]|
210
-
|[`SELECT`]|[`SET`]| Using `SET` (is [`ANSI`]) instead of `SELECT` when assigning variables due to properly work with `Msg 501 Subquery returned more than 1 value`|[20],[21],[22]|
211
-
|[`STR`]|[`CAST`][10]|`STR` is not [`ANSI`], extremly slow, don't use more than 15 digits, and has rounding problem - use `CAST` plus concatenate instead `STR`|[23]|
212
-
|[`ISNUMERIC`]|[`TRY_CONVERT`]|`ISNUMERIC` can often lead to data type conversion errors, when importing data. For SQL Server below 2012 use `WHERE` with `LIKE`. |[24]|
213
-
|[`GETDATE`]|[`SYSUTCDATETIME`]| Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. |[25]|
214
-
|[`GETUTCDATE`]|[`SYSUTCDATETIME`]| Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. |[25]|
215
-
|[`SYSDATETIME`]|[`SYSUTCDATETIME`]| Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. |[25]|
204
+
| Not Recommended | Recommended | When and Why | More details |
|[`!=`][12]|[`<>`][12]|`<>` is [`ANSI`], `!=` not `ANSI`, [`<>` and `!=` are identical][13]|[13]|
207
+
|[`CONVERT`][10]|[`CAST`][10]|`CAST` is [`ANSI`]|[14],[15]|
208
+
|[`ISNULL`]|[`COALECSE`]|`COALECSE` is [`ANSI`] and supports more than two arguments, `ISNULL` has dangerous behaviour with possibility to implicit triming string |[16],[17]|
209
+
|[`DATEDIFF`]|[`DATEADD`]| The predicate `MyDateTime < DATEADD(SECOND, -1, GETUTCDATE())` syntax is [`SARGable`]|[18],[19]|
210
+
|[`SELECT`]|[`SET`]| Using `SET` (is [`ANSI`]) instead of `SELECT` when assigning variables due to properly work with `Msg 501 Subquery returned more than 1 value`|[20],[21],[22]|
211
+
|[`STR`]|[`CAST`][10]|`STR` is not [`ANSI`], extremly slow, don't use more than 15 digits, and has rounding problem - use `CAST` plus concatenate instead `STR`|[23]|
212
+
|[`ISNUMERIC`]|[`TRY_CONVERT`]|`ISNUMERIC` can often lead to data type conversion errors, when importing data. For SQL Server below 2012 use `WHERE` with `LIKE`. |[24]|
213
+
|[`GETDATE`]|[`SYSUTCDATETIME`]| Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. |[25]|
214
+
|[`GETUTCDATE`]|[`SYSUTCDATETIME`]| Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. |[25]|
215
+
|[`SYSDATETIME`]|[`SYSUTCDATETIME`]| Daylight Saving Time and other factors can play havoc with our dates and times, rounding to the nearest 3 milliseconds. |[25]|
216
+
|[`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]|
217
+
|[`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]|
0 commit comments