Read sample rows
The learners table contains id, name, and score columns.
SELECT * FROM learners;Practice MySQL online with SQL queries and database exercises. Start with SELECT expressions, then explore tables, joins, and schema design in a real database lab.
Start here
Load a task into the terminal, then press Enter to see the result. Each example works in the introductory session on this page.
The learners table contains id, name, and score columns.
SELECT * FROM learners;Return only the columns you need.
SELECT name, score FROM learners;Find learners whose score is at least 80.
SELECT * FROM learners WHERE score >= 80;Read the sample rows from highest score to lowest.
SELECT * FROM learners ORDER BY score DESC;Count the current rows in the table.
SELECT COUNT(*) FROM learners;Add a row and run the first query again to inspect it.
INSERT INTO learners (name, score) VALUES ('Sam', 88);Change Alex’s score in the sample table.
UPDATE learners SET score = 95 WHERE name = 'Alex';Remove the inserted learner; this is also safe to try before inserting.
DELETE FROM learners WHERE name = 'Sam';No setup needed
Practice MySQL online with SQL queries and database exercises. Start with SELECT expressions, then explore tables, joins, and schema design in a real database lab.
Start with the short command exercises above. When you are ready for a project, open the linked LabEx lab to work with real tools in an online Linux environment, with step-by-step guidance and immediate feedback.
Keep learning
Build on your MySQL experiments with a structured skill tree. Explore the skills, choose a guided lab, and practice each concept in an online environment.
Start with queries and table operations, then use the MySQL Skill Tree for database setup and data-management tasks. Sign in to the linked lab for a real MySQL server.
The introductory exercises are free. Sign in for a complete LabEx environment; session duration and resources depend on your lab and plan.
No local installation is required. Sign in and open the lab in a modern browser. Follow the lab instructions to configure software inside the environment.
This preview supports a limited command set. Sign in and launch the MySQL lab for more commands, packages and services. Available software and permissions depend on the selected lab.
Follow the MySQL Skill Tree for guided labs and challenges. Practice regularly, inspect command output and ask Labby for help.
Your next step
Continue with real tools, guided labs, and Labby assistance.