You can run SQL in your browser without installing anything. The database lives inside the browser tab, so you open a page, type a query, and see the result. This works on a school computer, a laptop you cannot install software on, or a phone.
Hands-on Mentor works this way. The SQL course is free, and the queries run on your device, not on our server.
Why do people think SQL needs an installation?
Most SQL tutorials start with a long setup. You download a database server, set a password, start a service, and connect with a tool. Each step can fail, and each failure has its own error message.
That setup is useful for people who run databases at work. It is a poor first step if you only want to learn how SELECT works. The setup can take longer than the first lesson.
How can SQL run in a browser?
A modern browser can run a small database engine written to work inside a web page. When you open an exercise, the page loads that engine and fills it with the sample tables. When you press run, your query goes to the engine in your tab. The result comes back in the same tab.
Three things follow from this:
- You do not install or configure anything.
- Your queries do not travel to a server to be executed.
- A mistake cannot damage anything. You can always run the lesson again.
The first run can take a few seconds while the engine loads. After that, queries run fast.
What can you practice in the browser?
You can practice the same SQL you would write on a server: SELECT, WHERE, ORDER BY, GROUP BY, joins, subqueries, and more. The course uses one case, the student records of the fictional Northbridge University in Port Alder, so every lesson builds on tables you already know.
Here is a first query. It lists three departments in alphabetical order:
SELECT name, faculty FROM department ORDER BY name LIMIT 3;
| name | faculty |
|---|---|
| Business Administration | Faculty of Business and Management |
| Computer Programming | School of Applied Technology |
| Data Science and Analytics | Faculty of Engineering |
Now add a filter and a sort. This finds the best students from Port Alder:
SELECT first_name, last_name, gpa FROM student WHERE city = 'Port Alder' AND gpa >= 3.5 ORDER BY gpa DESC, last_name LIMIT 3;
| first_name | last_name | gpa |
|---|---|---|
| Camila | Osei | 3.88 |
| Zara | Larsen | 3.85 |
| Olivia | Chen | 3.61 |
Then count students per city:
SELECT city, COUNT(*) AS students FROM student GROUP BY city ORDER BY students DESC, city LIMIT 3;
| city | students |
|---|---|
| Port Alder | 45 |
| Lisbon | 9 |
| Seoul | 9 |
You can type any of these into an exercise and change them. Change 3.5 to 3.9. Add a second sort column. Seeing the result change is the fastest way to learn.
What are the limits of browser SQL?
Be honest about what you are not learning. A browser database is a small private copy. It does not teach you how to manage a shared server, set up user accounts for a team, or tune a very large database. The course covers the ideas behind these topics, such as keys, constraints, and permissions, but you do not operate a real server in it.
For learning SQL itself, the language, these limits rarely matter. The queries are the same.
How do you start?
1. Open the [SQL course page](/courses/sql). Lesson text is open to read.
2. Sign up for free when you want to work through the exercises and tests.
3. Start with [your first query](/learn/sql/first-query). It takes a few minutes.
4. After each lesson, answer the test. You need 70% to unlock the next lesson.
If your school blocks software installs, nothing changes. You only need a current browser and an internet connection.
What to read next
- [SQL course: 41 short lessons, free](/courses/sql)
- [First query lesson](/learn/sql/first-query)
- [SQL GROUP BY explained](/blog/sql-group-by)
- [Python or SQL: which should you learn first?](/blog/python-vs-sql-which-first)
- #sql
- #run sql in browser
- #beginners
- #no install