Lesson 25 of 30Article12 min
MySQL, SQL Server & Access Functions (Overview)
Core SQL (SELECT, JOIN, GROUP BY) works everywhere. String, date, and math helper functions differ by vendor.
Database-specific functions — high-level map
Core SQL (SELECT, JOIN, GROUP BY) works everywhere. String, date, and math helper functions differ by vendor.
Check your database docs when a function fails — COALESCE is portable; GETDATE() vs NOW() vs CURRENT_DATE is not.
Real-life example: Functions are regional dialects — 'elevator' vs 'lift' — same idea, different word on MySQL vs SQL Server.
- MySQL: CONCAT(), IFNULL(), NOW(), DATE_FORMAT()
- SQL Server: + concat, ISNULL(), GETDATE(), FORMAT()
- Access: & concat, NZ(), Now(), Format()
- All: COUNT, SUM, AVG, MIN, MAX, COALESCE (mostly)
Each database engine documents its own functions. Learn standard SQL first, then bookmark your engine's cheat sheet.
Same report, three dialects (current date label)
-- MySQL
SELECT CONCAT(full_name, ' - ', DATE_FORMAT(NOW(), '%Y-%m-%d')) AS label FROM students;
-- SQL Server
SELECT full_name + ' - ' + CONVERT(VARCHAR, GETDATE(), 23) AS label FROM students;
-- PostgreSQL / SQLite (portable)
SELECT full_name || ' - ' || DATE('now') AS label FROM students;