SQL Converter · T-SQL → PostgreSQL
Convert T-SQL SQL to PostgreSQL
SQL Server to PostgreSQL swaps TOP for LIMIT, [brackets] for "double quotes", ISNULL for COALESCE and GETDATE() for now(). A mechanical formatter only re-indents — it won’t rewrite dialect-specific syntax. The AI converter in the app translates the query and the table below shows exactly what changes.
T-SQL — source
PostgreSQL — converted
What changes from T-SQL to PostgreSQL
| T-SQL | PostgreSQL | Why |
|---|---|---|
| TOP 20 | LIMIT 20 | TOP is T-SQL syntax; Postgres uses a trailing LIMIT. |
| [Identifier] | "identifier" | Bracket quoting becomes standard double-quote quoting. |
| ISNULL(x, 0) | COALESCE(x, 0) | ISNULL is T-SQL-only; COALESCE is portable. |
| GETDATE() | now() | Current-timestamp function differs by dialect. |