Sql server® 2012 t-sql fundamentals


   Microsoft SQL Server 2012 T-SQL Fundamentals The



Download 10,93 Mb.
Pdf ko'rish
bet79/443
Sana26.01.2022
Hajmi10,93 Mb.
#411755
1   ...   75   76   77   78   79   80   81   82   ...   443
Bog'liq
BookSQL

36  

Microsoft SQL Server 2012 T-SQL Fundamentals



The 

HAVING

 Clause

With the HAVING clause, you can specify a predicate to filter groups as opposed to filtering individual 

rows, which happens in the WHERE phase. Only groups for which the logical expression in the  HAVING 

clause evaluates to TRUE are returned by the HAVING phase to the next logical query processing 

phase. Groups for which the logical expression evaluates to FALSE or UNKNOWN are filtered out. 

Because the HAVING clause is processed after the rows have been grouped, you can refer to ag-

gregate functions in the logical expression. For example, in the query from Listing 2-1, the HAVING 

clause has the logical expression COUNT(*) > 1, meaning that the HAVING phase filters only groups 

(employee and order year) with more than one row. The following fragment of the Listing 2-1 query 

shows the steps that have been processed so far.

FROM Sales.Orders 

WHERE custid = 71 

GROUP BY empid, YEAR(orderdate) 


Download 10,93 Mb.

Do'stlaringiz bilan baham:
1   ...   75   76   77   78   79   80   81   82   ...   443




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