Use SQLite for a small local SQL practice database. SQL dialects differ, so lessons using MySQL-specific syntax require MySQL instead of SQLite.
What you need
- SQLite command-line tools matching your operating system
- A practice folder
- A terminal; an official browser-based SQLite playground is an alternative
Set up your environment
- Download the SQLite command-line tools from sqlite.org. Extract them and locate
sqlite3orsqlite3.exe. - Open a terminal in your practice folder. Run
sqlite3 practice.db, using the full executable path if it is not on PATH. - At the SQLite prompt, enter the statements below. They create a small practice table and read one record.
- Exit the shell with
.quit. Openingpractice.dbagain lets you continue the same exercise.
Your first check
Enter these statements in the SQLite shell
CREATE TABLE IF NOT EXISTS learners (id INTEGER PRIMARY KEY, name TEXT);
INSERT INTO learners (name) VALUES ('Amina');
SELECT id, name FROM learners;Run or verify
sqlite3 practice.dbExpected result: The query returns a row containing Amina. The database file is saved in the current folder.
Common setup problems
- SQLite dot commands such as
.quitare shell commands, not SQL statements. - Use a practice database. Statements such as UPDATE and DELETE change stored records; preview the matching rows first.
Official documentation
Guide reviewed 17 November 2026. Check the linked vendor documentation for current supported versions and operating systems.