← Files SQL CopilotARCHIVED FILE

references/dialects.md

1.83 KB · Nov 6, 2026 · 06:47 UTC

↓ Download file

See the change to this file →

# Dialect translation map

Always identify source engine, target engine and major version where relevant. Do not splice incompatible constructs into one query. Confirm version-dependent syntax using `official-docs.md`.

| Topic | Typical dialect differences |
|---|---|
| Result limit | `LIMIT`, `TOP`, `FETCH FIRST`, and `OFFSET/FETCH` differ |
| Quote identifiers | `"name"`, `[name]`, and backticks have platform-specific meanings |
| Null-safe equality | `IS NOT DISTINCT FROM`, `<=>`, or equivalent expressions vary |
| Date arithmetic | `DATEADD`, `INTERVAL`, `DATE_ADD`, `TIMESTAMP_ADD` semantics differ |
| Cast errors | `TRY_CAST`, `SAFE_CAST`, strict `CAST` vary |
| Upserts | `ON CONFLICT`, `MERGE`, `ON DUPLICATE KEY UPDATE` require dialect checks |
| JSON/arrays | Operators, path expressions and unnesting differ substantially |
| Window filtering | `QUALIFY` is not universally supported |

## Typical engine reminders
- PostgreSQL: indexes, vacuum/statistics, `EXPLAIN (ANALYZE, BUFFERS)` requires care; `RETURNING` and `ON CONFLICT` are PostgreSQL-specific options.
- SQL Server/Azure SQL: T-SQL `TOP`, `TRY_CONVERT`, execution-plan and transaction practices; Synapse dedicated pools are not identical to Azure SQL.
- MySQL: version-dependent window/CTE capabilities and transaction behavior by engine.
- Oracle: empty string treated distinctively, date conversions and row limiting vary by release.
- Snowflake: `QUALIFY`, semi-structured VARIANT; Query Profile and pruning matter.
- BigQuery: GoogleSQL, partition filters, scanned bytes; `LIMIT` on `SELECT *` does not alone reduce bytes processed.
- Databricks SQL: Spark-based optimizer, shuffle/profile/file layout; verify current runtime.
- Redshift/Synapse: MPP distribution, data movement, columnstore/sort/stats.

Never claim parity until unit fixtures and target-engine behavior have been compared.

SHA-256: 03c34a8f5dbbd025229f1474a4b3ca96ba67abce3eb9bd894901051f4f10d0c2