SQL Introduction

What SQL is and how relational databases work.

✍️ 3 exercises + code challenge in this lesson

SQL (Structured Query Language, pronounced "S-Q-L" or "sequel") is the standard language for working with relational databases.

What can SQL do?

  • Retrieve data with queries.
  • Insert, update and delete records.
  • Create databases, tables, views and indexes.
  • Control who can access the data.

Tables

A relational database stores data in tables. Each table has columns (fields such as City) and rows (records, one per customer, product, order...).

Popular database systems include MySQL, PostgreSQL, Microsoft SQL Server, Oracle and SQLite. They all speak SQL, with small differences.

The editor loads a sample shop database with the tables Customers, Products, Orders and OrderItems before every run, so you can query them straight away.

Key Takeaways: SQL Introduction

Mastering SQL Introduction helps you write clean and reliable SQL code. Follow standard conventions, test edge cases, and keep logic simple. Try running the code example below and complete the exercises to build confidence.

SQL Introduction Code Example

SQL
SELECT * FROM Customers;
Free sign-in required · Google login available

SQL Introduction Practice Exercises

Check what you learned in “SQL Introduction”.

/ 3 solved
Fill in the blank

Select every column from the Customers table.

SELECT  FROM Customers;
✓ Correct! Not quite. Try again.
Multiple choice

What does SQL stand for?

✓ Correct! Not quite. Try again.
Code challenge

Select all rows and columns from the Products table.

Write the code in the live editor. Your answer is checked automatically.

Free sign-in required · Google login available

to save your exercise progress.
Finished this lesson?
Mark it complete to track your progress.

Stuck on something?

Ask the community in the CodesInTech forum.

Need a developer?

Learning on your own is great — and when you need professional help, our team builds custom software, websites and mobile apps for clients worldwide.

Explore Our Services