All major databases share core SQL, but each adds its own types, functions and syntax. Knowing the differences saves hours when you switch engines.
The major engines
| Engine | Typical use | Notable traits |
|---|---|---|
| MySQL / MariaDB | Web apps (LAMP), SaaS back ends | Open source, InnoDB engine, very popular, replication-friendly |
| PostgreSQL | General purpose, analytics, GIS | Most standards-compliant open-source engine; rich types (JSONB, arrays), extensions |
| SQL Server | Microsoft / enterprise stacks | T-SQL dialect, strong tooling, TOP, IDENTITY |
| Oracle | Large enterprises, banking | PL/SQL, ROWNUM, DUAL, powerful but commercial |
| SQLite | Mobile apps, browsers, embedded, tests | A library, not a server — the whole DB is one file; dynamic typing |
Dialect differences you will meet
| Task | MySQL | PostgreSQL | SQL Server | Oracle | SQLite |
|---|---|---|---|---|---|
| First N rows | LIMIT n | LIMIT n / FETCH FIRST n ROWS ONLY | TOP (n) / OFFSET … FETCH | FETCH FIRST n ROWS ONLY (12c+) | LIMIT n |
| Auto-increment id | AUTO_INCREMENT | GENERATED … AS IDENTITY / SERIAL | IDENTITY(1,1) | GENERATED AS IDENTITY | INTEGER PRIMARY KEY |
| String concat | CONCAT(a, b) | a || b | a + b / CONCAT | a || b | a || b |
| Current timestamp | NOW() | NOW() | GETDATE() | SYSDATE | CURRENT_TIMESTAMP |
| NULL replacement | IFNULL / COALESCE | COALESCE | ISNULL / COALESCE | NVL / COALESCE | IFNULL / COALESCE |
| Boolean type | TINYINT(1) | BOOLEAN | BIT | NUMBER(1) (BOOLEAN in 23ai) | integer 0/1 |
| Identifier quoting | `name` | "name" | [name] | "name" | "name" (also accepts the others) |
The same query in four dialects
Top 3 highest-paid employees:
SELECT name, salary FROM employees ORDER BY salary DESC LIMIT 3;name | salary
------+-------
Asha | 150000
Ravi | 120000
Priya | 110000SELECT TOP (3) name, salary FROM employees ORDER BY salary DESC;SELECT name, salary FROM employees ORDER BY salary DESC
FETCH FIRST 3 ROWS ONLY;Which SQL database should you choose for a new project?
Is SQLite a “real” database?