DATEADD/ DATEDIFF precision issueSQL Server 2019
Issue: When using DATEADD with datetime2, precision beyond 3 fractional seconds is truncated.
Resolution: Use datetime2(7) explicitly or switch to datetimeoffset.
Issue: When using DATEADD with datetime2, precision beyond 3 fractional seconds is truncated.
Resolution: Use datetime2(7) explicitly or switch to datetimeoffset.
Issue: MERGE may produce duplicate rows when executed with a parallel plan.
Resolution: Add OPTION (MAXDOP 1) or rewrite using INSERT/UPDATE/DELETE.
Issue: OPENJSON fails when JSON strings contain escaped forward slashes.
Resolution: Use WITH (path varchar(200) '$.value') and apply REPLACE.
Issue: Dropping a stoplist doesn't affect existing full‑text indexes.
Resolution: Re‑create the full‑text index after stoplist removal.
sp_executesql with dynamic SQLSQL Server 2012Issue: Unparameterized concatenation bypasses escaping.
Resolution: Always use parameter placeholders and pass values separately.