Foydalanib standart funksiyalardan foydalanib so‗rovlar yaratishni o`rganish


(9, 'Alisher', 'Xamdamov', 'O'zbek tili')


Download 94.69 Kb.
bet3/7
Sana02.06.2024
Hajmi94.69 Kb.
#1838889
1   2   3   4   5   6   7
(9, 'Alisher', 'Xamdamov', 'O'zbek tili'),
(10, 'Mavluda', 'To'raeva', 'Jismoniy tarbiya');

O’qituvchilar jadvali


Jadvallar ustida amallarni amalga oshiramiz
-- Talabalar jadvalidagi Ism va Familiyani kichik harfda va katta harfda chiqarish
SELECT LOWER(Ism) AS KichikIsm, UPPER(Familiya) AS KattaFamiliya
FROM Talabalar;


-- Talabalar jadvalidagi Ismni o'ngdan va chapdan 10 ta probel bilan to'ldirish
SELECT RPAD(Ism, 10, ' ') AS IsmOn, LPAD(Ism, 10, ' ') AS IsmChap
FROM Talabalar;


-- Talabalar jadvalidagi Guruhdagi 'A' harfini 'B' bilan almashtirish
SELECT REPLACE(Guruh, 'A', 'B') AS YangiGuruh
FROM Talabalar;

-- Talabalar jadvalidagi Ismni katta harfla boshlash va barchasini katta harfla chiqarish
SELECT INITCAP(Ism) AS KattaBoshIsm, UCASE(Ism) AS KattaIsm
FROM Talabalar;

-- Talabalar jadvalidagi Ismni teskari tartibda chiqarish
SELECT REVERSE(Ism) AS TeskariIsm
FROM Talabalar;


-- Talabalar jadvalidagi Yoshni formatlash
SELECT FORMAT(Yosh, 'D2') AS FormatlanganYosh
FROM Talabalar;
-- Talabalar jadvalidagi Ism va Familiya uzunligini hisoblash
SELECT Ism, LENGTH(Ism) AS IsmUzunligi, Familiya, LENGTH(Familiya) AS FamiliyaUzunligi
FROM Talabalar;


Agrеgat funksiyalardan foydalanish
Ishdan maqsad: Berilgan predmet soha ma`lumotlar bazasida
agregat funksiyalaridan foydalanishni o`rganish.
Masalani qo`yilishi: Predmet soha ma`lumotlar bazasi
shakllantirilgandan so`ng ob`yektlardagi ma`lumotlarni guruhli agregat
funktsiyalar orqali ishlash.

Download 94.69 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling