SQLancer
LESSON 0

SQL (Core) - What is SQL

Progress: 0%

What is SQL?

SQL (Structured Query Language) is the universal computer language designed to store, retrieve, filter, and transform structured data inside Relational Database Management Systems (RDBMS). If you have ever organized information in an Excel spreadsheet or Google Sheet, you already understand the core structure of a database: tables made of rows and columns.

Relational Databases vs. Spreadsheets & Raw Files

While spreadsheets work well for small personal data sets, production web applications, banking systems, and e-commerce platforms process millions of concurrent transactions per second. Relational databases like PostgreSQL, MySQL, and SQLite provide strict data integrity guarantees, concurrent access control, indexing for lightning-fast lookups, and standardized SQL query capabilities.

  • Tables (Entities): Collections of related records (e.g. vehicles, users, orders).
  • Columns (Attributes): Fields defining specific properties and data types (e.g. make_model as text, wheels as integer).
  • Rows (Records): Individual data instances (e.g. a single vehicle record).
  • Primary Key (PK): A unique column (like id) ensuring every row can be uniquely identified without ambiguity.
💡

Writing Your First SQL Query

SELECT * FROM vehicles;

The asterisk (*) acts as a wildcard instructing SQL to return all available columns from the specified table.

🚗 Table: Vehicles

id make_model wheels doors type
1 Ford Focus 4 4 Sedan
2 Tesla Roadster 4 2 Sports

🗄️ Schema Explorer SELECTABLE

vehicles
|

🎯 Exercises Checklist:

1. Select all columns and rows from the vehicles table
⚡ Practice Console

Data Output

No results. Run query to fetch data.

Current Task Target

5 rows