Dates, nulls, and strings are where cross-DB logic gets annoying fast
When queries move between engines, these three always seem to show up. The SQL looks fine, but the behavior suddenly isn’t.
Dates are usually the first thing that breaks. GETDATE() in SQL Server, NOW() in Postgres, SYSDATE in Oracle. That part is obvious enough. The more annoying part is date arithmetic.
DATEADD(day, 1, mydate) works in SQL Server. Postgres wants interval syntax. Same logic, different syntax, and suddenly a query that looked harmless needs rewriting.
Nulls are another one. Most behavior is similar, but the small differences still bite. Null ordering is a good example. Postgres puts nulls last by default in ascending order. SQL Server puts them first. Same query, same data, different row order.
Strings might be the sneakiest one. SQL Server is often case-insensitive because of collation settings. Postgres is case-sensitive by default. A filter that worked fine in SQL Server can quietly miss rows after a migration because the casing doesn’t match.
None of this is really “edge case” stuff either. It’s normal engine behavior, which is probably why it slips through reviews so easily.
Which one has wasted the most time for your team?