18+ Best Online Resources for Learning SQL and Database Concepts (2020 revision)

learning sql, learn sql online, online courses in SQL,

We did it again! Each year, we review the SQL courses and tutorials on the market to help you find the best online resources to learn SQL. Find out which SQL courses are worth a try!

But let's get to the point and take a closer look at some of the best online resources that can help beginners get started with SQL.

We'll start with websites that focus on SQL syntax and basic SQL concepts.

1. W3Schools - "SQL Tutorial"

W3Schools claims to be the largest web developer site on the Internet. It provides various tutorials and references on web development languages such as HTML, CSS, JavaScript, PHP, SQL, and JQuery, covering most aspects of web programming.


Their online SQL Tutorial guides you through syntax and most important statements, keywords, and functions. Short but concrete descriptions and many examples make this tutorial easy to read and understand.

A distinctive feature is the ability to test queries online. At the start of the tutorial, there is a sample database which you can modify and restore back to its original content at any time. The guide ends with a simple quiz.

The entire tutorial is available without registration.

2. Codecademy - "Learn SQL"

Codecademy is an online platform that offers a wide range of free coding courses in programming languages like HTML, JavaScript, jQuery, PHP, Python, and Ruby. In addition to these courses, Codecademy’s students can learn how to manage data with SQL.


Like all other courses at Codecademy, "Learn SQL" is free and interactive. It covers the basics of database fundamentals: tables, queries, aggregate functions, constructing advanced database queries, and more.

The course Learn SQL online consists of 4 lessons that focus on:

  • Basic SQL commands to manipulate data stored in relational databases.
  • The most commonly used SQL commands to query a table in a database.
  • Using SQL to perform calculations during a query.
  • Querying multiple tables using joins.

The user interface of each lesson is divided into three panels. The left one contains a description of the exercise with a brief theoretical introduction. In the center, there's an interactive SQL command line where the user writes SQL against an SQLite database. The panel on the right features a visual representation of the database schema with the query result.

After completing a lesson, you can test your knowledge with a quiz, or master your skills with a real-world project to teach you how to apply what you're learning in a hands-on, practical way. Unfortunately, both quizzes and projects are available only for users who have subscribed to a paid Pro version of Codecademy.

In order to participate in the course, you need to register using an email address or a Google or Facebook account.


3. LearnSQL.com

LearnSQL.com is an online platform offering plenty of interactive SQL courses. These range from beginner to advanced levels and can be done directly in the browser; there’s no need to install databases or other software.

Each course allows you to interactively practice what you’ve learned. It starts with a detailed explanation of the theory behind the lesson; after that, you’re given an exercise to complete. An interactive console verifies your solution. After completing all the exercises in a course, you take a final quiz to test your knowledge.


LearnSQL’s courses are grouped into learning paths. Each path allows you to obtain a certain skill set, e.g. in data analysis. You start by choosing a learning path and a SQL dialect (Standard SQL, MS SQL, or PostgreSQL).

There are several learning options available. You can choose between completing the full track, one or more mini tracks, or one or more individual courses. The Full track allows you to become a SQL master – even if you’ve never coded before. You’ll learn all the necessary tools, starting from the basics and then moving on to advanced SQL functions and features. Mini tracks develop your skills in a given knowledge area and level (e.g. basic or advanced).

This is a pay-as-you-go platform with two plans: basic ($39/month with no commitment) and premium ($29/month and a six-month commitment). Each plan delivers access to 29 courses and 13 tracks, but the premium plan provides additional content (like monthly challenges). There’s also a free option that lets you try a few exercises before committing to the platform.

4.  Khan Academy - "Intro to SQL"

Khan Academy provides its users with micro-lectures in the form of YouTube videos, lots of practice exercises, and a personalized learning dashboard. Combined, these tools empower learners to study at their own pace inside and outside of the classroom.


Among many courses offered by Khan Academy, you can find a free SQL course called "Intro to SQL: Querying and Managing Data."

Each lesson consists of two elements. The window on the left is a video tutorial, while the window on the right shows real-time changes in the database structure and the results of queries performed under the SQLite database. Exercises are supported by documentation and useful hints. After finishing the first part of the course, learners complete a more advanced project.

The whole course contains 5 parts, starting with SQL fundamentals. It continues with constructing more advanced SQL queries using operators (such as AND/OR, IN, LIKE, etc.) and joins. An ending section called "What to learn next" provides useful tips and links.

Khan Academy allows users to watch videos without registering; however, after registration (via Facebook, Google, or email) they can ask questions regarding videos and participate in discussions.

5. SQLZoo

SQLZoo is a nice free and interactive SQL tutorial developed and maintained by Edinburgh Napier University.


The course features interactive exercises for multiple types of databases, such as MySQL, PostgreSQL, Oracle, and SQL Server.

This site has three major sections: Tutorials, Assessments, and Reference.

A tutorial is a set of exercises that aims to acquaint you with new topics. You start with SQL basics, then go through nested SELECT statements and aggregate functions (such as COUNT, SUM, or AVG), ending with more advanced JOIN operations. At any time, you can consult the Reference section for background on the appropriate theory, explained with interactive examples.

After completing each tutorial, you can take a quiz to show how well you understand the topic.

The Assessments section offers several mini-projects; each includes 15 questions of varying levels of difficulty.

The course is available without registration. However, you can create an account with your email. This is recommended if you want to publish comments or contribute to the site.

6. Tutorialspoint - "Learn SQL"

Tutorialspoint claims to be the web's largest library of tutorials. Indeed, it offers dozens of SQL online courses in computer engineering, information technology, programming languages, and management.


If you’re looking to learn SQL or database concepts, you will find several tutorials here, including courses on SQL, MySQL, PostgreSQL, SQLite, DB2, PL/SQL, and others.

The "Learn SQL" tutorial provides a nice guide to basic SQL, its most useful functions, and more advanced topics. There are plenty of easy-to-understand examples, but no interactive exercises to practice what you have learned.

All courses available at Tutorialspoint.com, including the "Learn SQL" tutorial, can be accessed without registration.

It's worth mentioning that you can download the whole tutorial as a PDF file to get back to it at any time, even when offline.

7. Udacity - "Intro to Relational Databases"

Udacity offers interactive SQL online courses aimed at advancing academic and vocational skills. Although Udacity is profit-oriented, some courses are available for free.


One of its free courses is "Intro to Relational Databases", which provides the learner with the basics of SQL and database design. Since the course uses examples and programming exercises in Python, you'll also get to know the Python API. For this reason, Python fundamentals are required. You don't need any previous database experience, as this course is an entry-level introduction to relational databases.

The course consists of video lessons and each lesson includes a final quiz. The lessons are divided into four parts:

  • Relational Concepts
  • SQL queries
  • Python DB-API (accessing a relational database from Python code)
  • Advanced SQL (joins, normalization)

The course ends with a project that focuses on building a database-backed Python module to run a game tournament.

You don't have to register to preview the course. If you want to get full access, you must sign up with your email, Google, or Facebook account.

8. SQL Problems and Solutions

SQL Problems and Solutions is an interactive textbook which lets you visualize tables and execute queries against a sample database. The tutorial explains the basic concepts and constructs of SQL and provides examples at various levels of expertise.


Once you get familiar with SQL, you can practice your skills on the sister site "SQL Exercises". Here you can build and test your SQL DML statements: there are exercises for retrieving and modifying data using SELECT, INSERT, UPDATE, and DELETE statements.

You can read the entire textbook without registration, but you’ll need to sign up with your email address if you'd like to write your own queries in the interactive SQL console and execute them against sample databases.

9. Essential SQL

Essential SQL, authored by Kris Wenzel (@sqlkris), is a great place to learn the fundamentals of SQL and database concepts. The course is based on Microsoft SQL Server, which is why the author provides newbie users with a guide on how to get started using this database engine.


The tutorial presents free tools to get you started, a guide leading you through the setup process, step-by-step explanations of how to download and activate a sample database, and much more. You'll get to know how to create simple select and sort queries, introduce yourself to SQL Server's built-in function, learn how to normalize your database, and much more.

An especially great thing with Essential SQL is that Kris is personally involved in the teaching process. When there are problems or doubts, he strongly encourages readers to contact him.

A significant drawback of this course is its lack of a structured learning program. It's more an extensive collection of articles covering a wide range of SQL-related topics than a step-by-step tutorial.

Most of the articles are available without registration; however, some content requires users to sign up with an email account.

10. Learn SQL The Hard Way

The essence of this course is perfectly described by the following review: "This book will teach you the 80% of SQL you probably need to use it effectively, and will mix in concepts in data modeling at the same time."


Indeed, the tutorial looks much more like a story: each chapter has some theoretical content, related questions, and exercises. You can learn the basics of creating and manipulating tables, get familiar with data migration, and start understanding data manipulation and transactions.

Right now, there's an HTML ALPHA version of the book available, so users will have to wait for the final chapters to be completed.

The entire contents of the website are available without registration.

11. Udemy - SQL Tutorials

Udemy is a leading global platform where experts create courses and offer them to the public, either at no charge or for a tuition fee.


Udemy provides various database and SQL video courses designed for particular database engines, including MySQL, Oracle, and MS SQL Server. There are several free SQL courses for both beginners and advanced users.

Here are some free courses worth checking out:

To start SQL learning, you must register with your email address.

12. SoloLearn

SoloLearn is an online SQL training platform that offers a variety of free courses on programming languages. One of their courses is SQL Fundamentals - a great resource for fast, effective, and fun SQL tutorials.

SoloLearn is an online SQL training

The course consists of 27 lessons, split among the following four modules:

  • Basic Concepts
  • Filtering, Functions, Subqueries
  • JOIN, Table Operations
  • Challenges
SELECT statement but also the UPDATE, DELETE, INSERT, and ALTER statements.

The lessons are short but focused, allowing you to stay on target to finish the course in a relatively short period of time. Each module is followed by an interactive quiz, and the last module presents a summary with two challenges. You don't have to install any database server on your own machine to answer the questions or work through the interactive problems.

Delivered through a convenient and user-friendly platform, the Fundamentals course allows you to learn SQL at your own pace and from any device, such as your PC, tablet, or smartphone. The course is free, but it does require registration – though the process is very simple. Once you complete the course, you'll even get a free certificate to showcase your achievement!

13. MySQL Tutorial

This website provides users with a set of tutorials on managing MySQL databases and manipulating data. With various techniques - such as SQL queries, MySQL stored procedures, database views, triggers, and more - the tutorials show how to deal with common tasks in MySQL.


The Basic MySQL tutorial helps you get familiar with the fundamentals, including managing databases, creating tables, and querying and modifying data using various MySQL statements and other constructs. Lessons also contain example queries that you can run and observe.

In the MySQL Tips section, users are provided with advanced techniques and tips to help them solve the most difficult challenges in MySQL effectively.

Other tutorials give in-depth background information on:

All tutorials are available without registration.

14. SQLCourse

SQLCourse provides easy-to-understand SQL instructions and allows you to practice what you learn with an online interpreter. With these tools, you can create your own unique tables and perform SELECTSs, INSERTs, UPDATEs, DELETEs, and DROPs - in other words, you'll learn the basics of SQL by doing it yourself.


When you complete the basic training, you can continue developing your SQL skills with SQLCourse2. This course gives you an introduction to the important advanced features and clauses of the SELECT statement that weren't supported in the previous part.

The resources of both websites, SQLCourse and SQLCourse2, are available without registration; however, you can sign up with your email to get free access to newsletters, whitepapers, and other premium contents.

15. Database Journal

The site is related to SQLCourse and SQLCourse2. Although it looks old fashioned, Database Journal is a great and comprehensive source of knowledge. There are lots of database articles, news pieces, and tutorials regarding MS SQL, Oracle, DB2, MS Access, and MySQL database management systems.


You don't have to register to take advantage of this website, but you can sign up with your email to get free access to newsletters, whitepapers, and other premium contents.

16. Guru99

Guru99 has a wealth of tutorials on a wide variety of subjects. Some of the tutorials are written, while others are video-based.
SQL Tutorial for Beginners Learn in 7 Days

As far as SQL, the Guru99 website offers “SQL Tutorial for Beginners Learn in 7 Days”, which teaches SQL from the basics, such as the fundamentals of the SQL language, to more advanced techniques like joining tables, set operations, and subqueries. It is not an interactive course (it has no SQL Console), but it is an interesting resource for learning SQL. This website offers also others SQL courses for PL/SQL and SQLite.

This SQL Tutorial is based on the MySQL database server. On the tutorial’s main website, you’ll find the table of contents. The topics in the respective sections are explained clearly and precisely. In addition to the section text, diagrams and funny pictures explain the material in an easy and accessible manner.

In each section, you’ll also find query syntax and examples. Sections conclude with a short summary, and you can also take an SQL Quiz to test your acquired knowledge.

All of Guru99’s educational tutorials are free, and they don't even require registration.

*            *            *            *            *

The following resources cover database fundamentals and usage.

17. SQL for Web Nerds

"SQL for Web Nerds" is a free online book written and distributed by MIT professor Philip Greenspun. Some of you may be familiar with this book, since it's required reading for many university database classes.


"SQL for Web Nerds" teaches relational database management systems from the perspective of a web application developer rather than from a theoretical point of view. It covers basic database concepts such as ACID and how RDBMS work; provides examples of simple and complex queries, transactions, triggers, and views; and tackles issues like having Java executing inside an Oracle Server, handling foreign and legacy data, and normalization. Note: The SQL examples given in the book are for the Oracle database.

All of this is presented in a light way, with well-thought-out examples. Photographs illustrating the author's concepts enrich the tutorial.

The entire website is available without registration.

18. Stanford Database Course

This course covers database design and the use of database management systems for applications. It's where you can find self-paced mini-courses or one collective "Introduction to Databases" course that contains all mini-courses and a no-SQL review.


Courses are taught by Professor Jennifer Widom, co-author of four academic books covering beginning and advanced introductions to database systems.

In brief, these courses cover:

  • Introduction to relational databases
  • Querying Relational Databases and XML Databases
  • Database Design
  • SQL Advanced Features

The Stanford Database Course has four major elements: Courseware, Readings, Discussion Forum, and Wiki. The main materials (surveys, video lectures with transcripts, quizzes, and exercises) are found under Courseware. Suggested supplementary readings and other pointers are found under Readings.

If you want to enroll in the course, you must register for an account with the Stanford online learning system.

*            *            *            *            *

The following resources focus on learning through fun.

19. Schemaverse

Who said that the learning process has to be completely based on tutorials? It could also be fun! So if you are keen on computer games and want to learn SQL, this one is definitely for you.


Briefly, Schemaverse is a space-based strategy game implemented entirely within a PostgreSQL database. Players start on their home planets, where they can build new spaceships and mine resources that can be used to create or upgrade additional spaceships. After completing their own fleet, they can expand across the universe and conquer planets belonging to other players. To command their fleet and compete against others, the gamers must use raw SQL statements.

It's not only beginners who can find something here. Indeed, people more advanced in PostgreSQL will definitely enjoy playing Schemaverse. As a result, the gamer will not only be fluent in basic SQL, but they'll also get acquainted with PL/pgSQL.

To participate in the game, you must sign up with your email.

20. GalaXQL 3.0

Ready for another fun approach to learning? This one is a galaxy manipulation application, where you can run queries against the galaxy database model created in SQLite. The course provides a virtual teacher, Professor Alfred T. Guru, who introduces you to basic SQL syntax.


The course starts with an explanation of the SELECT statement, goes on through transactions, and ends with indexes. Each chapter, along with a detailed explanation, contains an exercise that puts the theory into practice. Basically, the exercise relies on writing an SQL query in the editor below the galaxy map. After completing the task, the user gets the query results or, in case of errors, receives helpful, human-readable error messages.

In addition to the online course, there are downloadable desktop versions available for Windows, OS X, and Linux.

The tutorial is available without registration.

*            *            *            *            *

21. SQL References

The following are links to online documentation for some databases.

Although simple queries don’t change much between SQL dialects, it's important to be aware of the documentation for your dialect of SQL and use it often. Here are the common dialects' references:

*            *            *            *            *

Online tools to practise and improve SQL skills

22. SQL Fiddle


SQLfiddle is the perfect tool to test queries and compare and contrast SQL statements in different database back-ends. It’s also handy when you don't have a particular database platform readily available but would like to see what a given query would look like in that environment.



Vertabelo allows you to design your database structure for the most popular database engines, including PostgreSQL, MySQL, Oracle, SQL Server, SQLite, and IBM DB2. Here, you can put into practise what you learned about database modeling concepts. At any time, you can generate an SQL script that creates/removes all elements in your database or removes selected elements/constraints.

Vertabelo checks your model before SQL script generation and notifies you of any errors or warnings. You can run the script in a particular database or in SQLfiddle and play with it there.

Note that Vertabelo offers free academic accounts for students and lecturers learning or teaching database design. To register such an account, you must provide your academic email address, i.e. the address with your educational institution's domain. Click here to sign up for an academic account.

Here you have a sample interactive database model created in Vertabelo. If you'd like to try out what it’s like to model a database online, just click the "Edit model" button. It's free and no registration is required.

Patrycja Dybka

Junior Java Developer @ e-point