|
So`rov: Select id, sin(id) from mutolachi
|
bet | 18/19 | Sana | 16.05.2024 | Hajmi | 15,05 Mb. | | #237968 |
Bog'liq mal.B.2-ishSo`rov: Select id, sin(id) from mutolachi;
Natija:
11.12– rasm. Sin() funksiyasidan foydalanish
11. LOG()- Sonnig natural logarifmni hisoblash.
So`rov: Select id, log(id) from mutolachi;
Natija:
11.13– rasm. Log() funksiyasidan foydalanish
12. BETWEEN() - ko`rsatilgan oraliqdagi ma’lumotlarni chiqarish.
“faollar” jadvalidan oqigan kitoblar soni 7 va 11 oralig’ida bo’lgan faollar ma’lumotlari chiqaramiz;
So`rov: Select *from faollar where oqigan_kitoblar_soni between 7 and 15;
Natija:
11.14 – rasm. Between() funksiyasidan foydalanish
13. MID()- ustundagi yozuvlarning bosh harfini shiqarish.
“mutolachi” jadvalidagi FISHlarini bosh harflarini va FISHnii chiqaramiz.
Natija:__11.15_–_rasm._Mid()'>So`rov: Select mid(FISH ,1,1) as ‘bosh harflar’, FISH from mutolachi;
Natija:
11.15 – rasm. Mid() funksiyasidan foydalanish
11 – Amaliy mashg’ulot
Mavzu: Murakkab so‘rovlar yaratish. TOP, LIMIT yoki ROWNUM
So`rov: SELECT * FROM mutolachi LIMIT 3;
Buyrug`ini kiritamiz natijada birinchi uchta satr hosil bo`ladi
Natija:
13.1 – rasm. Limit operatori orqali 3 ta qatorni ekranga chiqarish
So`rov: Select FISH FROM mutolachi LIMIT 2,3;
Buyrug`ini yozamiz, natijada 2, 3 satrlar hosil bo`ladi.
Natija:
13.2 – rasm. Limit operatori orqali 1,2 qatorni ekranga chiqarish
So`rov: SELECT FISH FROM mutolachi ORDER BY FISH DESC LIMIT 1,2;
Natija:
12 – Amaliy mashg’ulot
|
| |