01 / 05
What is SQL?
The data behind an app — users, products, posts — is kept in a database.
SQL is the language you use to talk to it. "Show me this", "add this", "get rid of this" — you say it in statements.
Pull rows out, then filter them
INPUT · Slides
01 / 05
The data behind an app — users, products, posts — is kept in a database.
SQL is the language you use to talk to it. "Show me this", "add this", "get rid of this" — you say it in statements.
02 / 05
What is inside a database is shaped like a table.
This course uses a canteen's menus table.
id / name / price / category03 / 05
SELECT column FROM table; gives you every row of that column.
You can read it as "from menus, select name". SQL sits close to an English sentence.
SELECT name FROM menus;Result
curry rice / tofu udon / omelette rice / soy ramen / fried chicken set
04 / 05
Line the column names up with , and you can take several at the same time.
SELECT name, price FROM menus;05 / 05
* for every columnUse * (an asterisk) and you get every column.
Have a look at the whole thing with * first, then narrow to the columns you need — that is the first step of exploring a database.
SELECT * FROM menus;