Skip to content
  • RDBMS Landscape & Dialects · SQL

RDBMS Landscape & Dialects

LearnViaNotes @learnvianotes· 2 min read

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

EngineTypical useNotable traits
MySQL / MariaDBWeb apps (LAMP), SaaS back endsOpen source, InnoDB engine, very popular, replication-friendly
PostgreSQLGeneral purpose, analytics, GISMost standards-compliant open-source engine; rich types (JSONB, arrays), extensions
SQL ServerMicrosoft / enterprise stacksT-SQL dialect, strong tooling, TOP, IDENTITY
OracleLarge enterprises, bankingPL/SQL, ROWNUM, DUAL, powerful but commercial
SQLiteMobile apps, browsers, embedded, testsA library, not a server — the whole DB is one file; dynamic typing

Dialect differences you will meet

TaskMySQLPostgreSQLSQL ServerOracleSQLite
First N rowsLIMIT nLIMIT n / FETCH FIRST n ROWS ONLYTOP (n) / OFFSET … FETCHFETCH FIRST n ROWS ONLY (12c+)LIMIT n
Auto-increment idAUTO_INCREMENTGENERATED … AS IDENTITY / SERIALIDENTITY(1,1)GENERATED AS IDENTITYINTEGER PRIMARY KEY
String concatCONCAT(a, b)a || ba + b / CONCATa || ba || b
Current timestampNOW()NOW()GETDATE()SYSDATECURRENT_TIMESTAMP
NULL replacementIFNULL / COALESCECOALESCEISNULL / COALESCENVL / COALESCEIFNULL / COALESCE
Boolean typeTINYINT(1)BOOLEANBITNUMBER(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:

SQLite / MySQL / PostgreSQL
SELECT name, salary FROM employees ORDER BY salary DESC LIMIT 3;
Output
name  | salary
------+-------
Asha  | 150000
Ravi  | 120000
Priya | 110000
SQL Server
SELECT TOP (3) name, salary FROM employees ORDER BY salary DESC;
Oracle 12c+ / PostgreSQL / SQL standard
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?

Free for students and teachers

Write notes like this one

Cards for every idea, quizzes and flashcards, read aloud — on the web and your phone.

Something wrong with this note? Open it to report