|
Select ID, FISH, round(ID/staji, 3) from xodimlar
|
bet | 15/17 | Sana | 14.05.2024 | Hajmi | 3,3 Mb. | | #232380 |
Bog'liq qayta o\'qish mb7-12Select ID, FISH, round(ID/staji, 3) from xodimlar;
1.7
select ID, maoshi, power(ID, maoshi) from murabbiy;
1.8
1/9
Select vazn, sqrt(vazn) from futbolchilar;
1.10 Select ID, sin(ID) from murabbiy;
1.11 Select ID, log(ID) from futbolchilar;
1.12Select * from murabbiy where ID between 1 and 3;
1.13 Select mid(FISH,1,1) as 'bosh harflar', FISH frommurabbiy;
11 – Amaliy mashg’ulot
Mavzu: Murakkab so‘rovlar yaratish. TOP, LIMIT yoki ROWNUM
Ishdan maqsad: Berilgan predmet soha ma`lumotlar bazasidan foydalanib TOP, LIMIT yoki ROWNUM lardan foydalanishni o`rganish.
Masalani qo`yilishi: Predmet soha ma`lumotlar bazasi shakllantirilgandan so`ng undan unumli foydalanishni tashkil etish maqsadida TOP, LIMIT yoki ROWNUM lar orqali so`rovlar yaratish.
Uslubiy ko`rsatmalar: SQL LIMIT va SQL TOP operatorlarining vazifasi belgilangan satrlarni chaqirishdan iborat. SQL TOP operatori MS SQL Serverda ishlaydi, SQL LIMIT operatori esa MySQLda va Oracle da ROWNUM operatori ishlaydi ularnig vazifasi bir hil.
SQL Server / MS Access Syntax:
SELECT TOP number|percent column_name(s)
FROM table_name
WHERE condition;
MySQL Syntax:
SELECT column_name(s)
FROM table_name
WHERE condition
LIMIT number;
Oracle Syntax:
SELECT column_name(s)
FROM table_name
WHERE ROWNUM <= number;
|
| |