▶ Try SQL

SQL Introduction

SQL — Structured Query Language — is the standard language for working with databases.

What is SQL?

SQL stands for Structured Query Language. It is used to communicate with and manipulate databases. SQL is the standard language for Relational Database Management Systems (RDBMS) such as MySQL, PostgreSQL, SQLite, MS SQL Server, and Oracle.

With SQL you can:

💡 Did You Know? SQL is the most widely used language for data professionals, data analysts, and backend developers. It is used by companies like Google, Facebook, Amazon, and Netflix every day.

SQL vs. Other Languages

SQL is a declarative language — you tell the database what you want, not how to get it.

Example — Your first SQL query
SELECT * FROM customers;

This query retrieves all rows from the customers table. That's it!

SQL Syntax Rules

Some important rules to know:

RuleExample
SQL keywords are case-insensitiveselect = SELECT
Statements end with a semicolon ;SELECT * FROM table;
String values use single quotes '...'WHERE name = 'Alice'
Comments use -- or /* */-- This is a comment

Sample Database Used in This Tutorial

Throughout this SQL tutorial, we'll use a sample Customers table:

CustomerIDNameCityCountryAge
1Alice JohnsonNew YorkUSA28
2Bob SmithLondonUK35
3Carlos RiveraMadridSpain42
4Priya SharmaMumbaiIndia31
5Yuki TanakaTokyoJapan25
📝 Note The SQL Playground comes pre-loaded with this sample data. Click ▶ Try it on any example to open it instantly!