|
![](/i/favi32.png) Taskent 2021 13- laboratoriya ishi mavzu: Murakkab so‘rovlar yaratish. Top, limit yoki rownum
|
səhifə | 1/8 | tarix | 11.05.2023 | ölçüsü | 3,62 Mb. | | #109646 |
|
MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI
AXBOROT XAFSIZLIGI FAKULTETI 713-20-GURUH TALABASI NARZULLAYEV SARDORNING
MA’LUMOTLAR BAZASI FANIDAN 4-AMALIY TOPSHIRIG’I
TASKENT - 2021
13- LABORATORIYA ISHI
Mavzu:Murakkab so‘rovlar yaratish. TOP, LIMIT yoki ROWNUM
Ishdanmaqsad:Berilganpredmetsohama`lumotlarbazasidanfoydalanib TOP, LIMIT yoki ROWNUM lardan foydalanishnio`rganish.
Masalaniqo`yilishi:Predmetsohama`lumotlarbazasishakllantirilgandan so`ngundanunumlifoydalanishnitashkiletishmaqsadidaTOP, LIMIT yoki ROWNUM lar orqali so`rovlar yaratish.
Uslubiyko`rsatmalar:SQL LIMIT va SQL TOP operatorlarining vazifasi belgilangan satrlarni chaqirishdan iborat.SQL TOP operatori MS SQLServerda ishlaydi,SQL LIMIT operatori esa MySQLda va Oracleda 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;
Misol. MS SQL Serverda ishlash
SELECT TOP 3 * FROM Customers;
Misol. SQL da ishlash
SELECT * FROM Customers
LIMIT 3;
Misol. Oracleda ishlash
SELECT * FROM Customers
WHERE ROWNUM <= 3;
Ishni bajarish tartibi
Avvalgi bajargan korpus nomli jadvalni chaqirib olamiz.
SELECT * FROM hokimyat_ishchilar;
Dostları ilə paylaş: |
|
|