Get current working directory



Download 0,85 Mb.
bet18/26
Sana26.05.2022
Hajmi0,85 Mb.
#609643
1   ...   14   15   16   17   18   19   20   21   ...   26
Bog'liq
notes2

The SQL HAVING Clause


The HAVING clause was added to SQL because the WHERE keyword cannot be used with aggregate functions.

HAVING Syntax


SELECT column_name(s)
FROM table_name
WHERE condition
GROUP BY column_name(s)
HAVING condition
ORDER BY column_name(s);

Yuqorida group by dan keyin kelgan ustunga mos tushunchi va having ni ham qanoatlantiruvchi larni city lar soni va citylar joylashgan countrylarni chiqaradi.

Having odatda group by bilan birgalikda bajariladi.


The SQL EXISTS Operator


The EXISTS operator is used to test for the existence of any record in a subquery.
The EXISTS operator returns TRUE if the subquery returns one or more records.

EXISTS Syntax


SELECT column_name(s)
FROM table_name
WHERE EXISTS
(SELECT column_name FROM table_name WHERE condition);

Demak yuqorida difinition ham berilgan. Where exists dan keyin qavs ichida yozilgan operatsiyani qanoatlantiruvchi birorta record yoki records mavjud bo’lsa “where exists ” true qiymat qaytaradi . agarda qavs ichkarisidagi operatorlarga mos biror dona record topilmasa “ where exists” false qiymat qaytaradi. Agar false qaytsa celect customername, city … camandasi ham bajarilmaydi.




The SQL ANY and ALL Operators


The ANY and ALL operators allow you to perform a comparison between a single column value and a range of other values.

The SQL ANY Operator


The ANY operator:

  • returns a boolean value as a result

  • returns TRUE if ANY of the subquery values meet the condition

ANY means that the condition will be true if the operation is true for any of the values in the range.

ANY Syntax


SELECT column_name(s)
FROM table_name
WHERE column_name operator ANY
(SELECT column_name
FROM table_name
WHERE condition);
Note: The operator must be a standard comparison operator (=, <>, !=, >, >=, <, or <=).

Download 0,85 Mb.

Do'stlaringiz bilan baham:
1   ...   14   15   16   17   18   19   20   21   ...   26




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

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish