Sql server® 2012 t-sql fundamentals


  Order is not guaranteed



Download 10,93 Mb.
Pdf ko'rish
bet209/443
Sana26.01.2022
Hajmi10,93 Mb.
#411755
1   ...   205   206   207   208   209   210   211   212   ...   443
Bog'liq
BookSQL

1. 

Order is not guaranteed. A 

table expression is supposed to represent a relational table, 

and the rows in a relational table have no guaranteed order. Recall that this aspect of a 

relation stems from set theory. For this reason, standard SQL disallows an ORDER BY clause 

in queries that are used to define table expressions, unless the ORDER BY serves another 

purpose besides presentation. An example for such an exception is when the query uses the 



OFFSET-FETCH filter. T-SQL enforces similar restrictions, with similar exceptions—when TOP or 

OFFSET-FETCH is also specified. In the context of a query with the TOP or OFFSET-FETCH filter, 

the ORDER BY clause serves as part of the specification of the filter. If you use a query with 



TOP or OFFSET-FETCH and ORDER BY to define a table expression, ORDER BY is only guar-

anteed to serve the filtering-related purpose and not the usual presentation purpose. If the 

outer query against the table expression does not have a presentation ORDER BY, the output 

is not guaranteed to be returned in any particular order. See the “Views and the ORDER BY 

Clause” section later in this chapter for more detail on this item. 


Download 10,93 Mb.

Do'stlaringiz bilan baham:
1   ...   205   206   207   208   209   210   211   212   ...   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