Kable AcademyDatabase Hands-On Assignment
no database selected
0/15
Databases
SHOW DATABASES;
List all databases
CREATE DATABASE name;
Make a new database
USE name;
Switch to a database
Tables
SHOW TABLES;
List tables
DESCRIBE table;
View table schema
CREATE TABLE name (cols);
Create a table
ALTER TABLE name ADD col type;
Add a column
Insert & Select
INSERT INTO name VALUES (...);
Add a row
SELECT * FROM name;
View all rows
SELECT col FROM name;
Select one column
SELECT DISTINCT col FROM name;
Unique values only
Filtering
... WHERE cond;
Filter rows
... WHERE a OR b;
Multiple conditions
... WHERE NOT x;
Exclude a condition
... WHERE col < val;
Comparison filter
Modify & Sort
UPDATE name SET col=val WHERE cond;
Edit a row
DELETE FROM name WHERE cond;
Remove a row
... ORDER BY col ASC;
Sort results
... LIMIT n;
Limit results
SELECT COUNT(*) FROM name;
Count rows
💡 Every SQL command ends with a semicolon ;
Kable Academy
SQL Lab · v3
MISSION 1 Basics View all databases

Welcome to SQL Lab 🗃️

Your interactive MySQL terminal. Build real databases, write real queries, get instant feedback. 15 missions across 4 skill levels — from creating your first database to advanced filtering and data manipulation.

Type SQL below and press Enter to run. Use to recall previous commands. Hit 💡 Hint if you get stuck. The Quick Reference on the left has every command you need.

CREATE TABLE name (cols);Create a table
Mission complete!
mysql>

🛠 Free Play Mode

The full SQL terminal — no missions, no rules. Build anything you want. Try one of these challenges:

🏫 Create a students table 🎮 Build a video games database 🌮 Design a restaurant menu 📦 Inventory tracking system 🐾 Animal shelter records

Free Play 🛠

This is your sandbox. The database you built in missions is available here too — you can query it, add to it, or start fresh with new databases.

Pick a challenge above for a starting prompt, or invent your own. Practice makes permanent!

mysql>