What is a database?
Tables, rows, columns and your first query
A database is an organised store of data. The most common kind is relational: data lives in tables, like in Excel.
- Table — one topic: students, courses, payments
- Column — a property: name, age, score
- Row — one record: one student
SQL (Structured Query Language) is the language for asking a database questions. A question is called a query.
All lessons use one table — talabalar ("students", 10 rows). It is ready in the editor every time. Table and column names are in Uzbek: ism = first name, familiya = last name, guruh = group, viloyat = region, yosh = age, ball = score.
Your first query
SELECT * FROM talabalar;
SELECT — "choose", * — "all columns", FROM talabalar — "from the students table". Result:
| id | ism | familiya | guruh | viloyat | yosh | ball |
|---|---|---|---|---|---|---|
| 1 | Aziz | Karimov | 25-407 | Toshkent | 19 | 88 |
| 2 | Malika | Yusupova | 25-407 | Samarqand | 18 | 95 |
| 3 | Jasur | Rahimov | 25-408 | Buxoro | 20 | 72 |
| 4 | Dilnoza | Tosheva | 25-408 | Toshkent | 19 | 81 |
| 5 | Bekzod | Aliyev | 25-407 | Farg'ona | 21 | 64 |
| 6 | Nilufar | Saidova | 25-409 | Namangan | 18 | 90 |
| 7 | Sardor | Qodirov | 25-409 | Xorazm | 20 | 57 |
| 8 | Gulnora | Ergasheva | 25-408 | Andijon | 19 | 77 |
| 9 | Otabek | Nazarov | 25-409 | Toshkent | 22 | 69 |
| 10 | Zarina | Mirzayeva | 25-407 | Qashqadaryo | 18 | 84 |
💡 SQL keywords are not case-sensitive:
selectworks too. Writing them in CAPITALS is a convention — easier to read. The;at the end means "the query ends here".
Video lesson
Practice SQL
Run the query in the editor to see all data in the talabalar table. Then press "Check".
Show solution
SELECT * FROM talabalar;