Sql · Introduction to SQL
Getting started
The full text of this chapter, to read or revisit. To practise, do the exercises.
▶ Do the exercisesExercise 1 — What is SQL?
SQL (Structured Query Language) is the language used to talk to databases. With SQL, you can find, add, update, or remove data easily!
It's really powerful and used by almost everyone in every industry where we need Relational Databases. It’s used by companies like Netflix, Uber, and Facebook to manage their data.
Is SQL a real programming language?
SQL is a programming language, but it’s not a general-purpose programming language like Python or Java. The specifically designed for managing and manipulating databases. It's specific name is declarative programming language, which means you describe what you want to do with the data, not how to do it.
Exercise 2 — Meet Your First Table!
A table is a collection of rows and columns—just like a spreadsheet. That's how we organize data in SQL. Here's one about Codémons!
Exercise 3 — Your first query!
Try running your first SQL command! You just have to press the run button. It's going to run the code written there which basically means "give me all the data from the table".
SELECT * FROM codemon;
Exercise 4 — Choose Your Codémon
Here are the 3 starter Codémon:
- Aquachu 💧
- Florachu 🌿
- Pyrochu 🔥
Let's start small and use SQL to get the data about the Codémon of your choice. You just need to replace ??? with the name of the Codémon you want to choose.
SELECT * FROM codemon WHERE name="???";
Exercise 5 — What can SQL do?
Let's see if you're ready for next step! Which of these is something you can do with SQL?
Options
• All of these answers!
• Get data from a table
• Add new users
• Update information
Hint : SQL lets you search, insert, update, and delete data. It's like magic for databases!
Exercise 6 — Well Done, You Queried Data!
You just ran your first SQL query. With this superpower, you can explore tons of data in no time!
Back to the course