Home / Learn Secure SQL / SQL Dialects: One Language, Several Accents
SQL Dialects: One Language, Several Accents
SQLite, PostgreSQL, MySQL, SQL Server differences you will meet.
Theory in plain words
Definition
Every database implements the core of SQL similarly but differs in details: string quoting, auto-increment syntax, date functions, and placeholder styles for parameters.
Why you need this
Knowing that dialects differ prevents confusion when an example from one database does not run unchanged on another, and matters directly for the parameter placeholder syntax in the next part of the course.
How it works
Check your specific database's documentation for exact syntax; the concepts in this course (prepared statements, validation, least privilege) apply to all of them equally.
Where you'll see this
- Web application code review
- Backend development
- Database administration
| Topic | SQLite | PostgreSQL | MySQL |
|---|---|---|---|
| Auto id | INTEGER PRIMARY KEY | SERIAL / IDENTITY | AUTO_INCREMENT |
| Placeholder | ? or :name | $1, $2, ... or :name | ? or :name |
| String concat | 'a' || 'b' | 'a' || 'b' | CONCAT('a','b') |
| Boolean | stored as 0/1 | true BOOLEAN type | stored as 0/1 |
Test what you just read
1. Across dialects, what this course teaches...
Concepts generalise; syntax varies.