(click anywhere to close)

A Guide to SQL

category: Website | course: SQL | difficulty:
1. Table of Contents

Databases are everywhere. When I say database, people often think about websites gathering lots of data about something, so they can use the results to optimize or learn something about their users. That’s data analysis, and while you can use databases for that, they can do so much more.

For example, blogs load their posts and comments from a database, user accounts are saved inside a database, online games save game data inside a database, web shops save their products in a database, and so on. Whatever you’re working on, if it’s going to be even a little complex or dynamic, you’ll need a database.

Therefore, we need a way of communicating with databases, a way of telling it to do what we want. Luckily, just like HTML and CSS, there’s a single standardized language we can use: SQL, which stands for Structured Query Language. Basically, it lets us query the database (such as request specific data from it) following a structured syntax. So, it helps the database understand us better, and it helps us not lose our minds in the complexity of the world of databases.

Just like HTML and CSS, however, SQL on its own isn’t enough. A browser is needed to interpret HTML and display it as something meaningful, and in the same way, a database management system is needed to process SQL queries and do something meaningful with it. We call these systems RDBMS: Relational Database Management Systems.

You can view SQL as the native tongue of these RDBMS. Generally, they all speak it in nearly the exact same way. The only difference is that each RDBMS has its own dialect; they add and remove some of the functionality of basic SQL in favour of their own system.


Therefore, whichever RDBMS you choose, there will be some differences with the (advanced) syntax and functionality. Most systems add their own functions, change some keywords here and there, or remove things they think they have a better alternative for.

In this course, I will discuss the standardized SQL language, and if necessary mention some RDBMS specific information for the popular databases. Otherwise, you should be fine, or you should be able to find the differences in the documentation of your particular system.

Have fun!

There’s one alternative to SQL, which are NoSQL databases that mainly use JavaScript or JavaScript-like syntax. No one is strictly better than the other, and I think you should take a look at both if you plan on doing a lot of work with databases. Both systems are applicable to different use cases.

Table of Contents

  1. Installation
  2. Relational Databases
  3. Syntax & Queries
  4. Creating
  5. Reading
  6. Updating
  7. Deleting
  8. Structure
  9. Keys & Constraints
  10. Data Types
  11. Operators & Conditions
  12. Aliases & Variables
  13. Aggregators
  14. Sorting
  15. Grouping
  16. Filtering
  17. Joins I
  18. Joins II
  19. Searching
  20. Functions
  21. Subqueries
  22. Security & Optimization
  23. Conclusion: what now?


No previous post :( [SQL] Installation
Do you like my tutorials?
To keep this site running, donate some motivational food!
Chocolate Milk