Sql server® 2012 t-sql fundamentals


The Identity property and the Sequence Object



Download 10,93 Mb.
Pdf ko'rish
bet301/443
Sana26.01.2022
Hajmi10,93 Mb.
#411755
1   ...   297   298   299   300   301   302   303   304   ...   443
Bog'liq
BookSQL

The Identity property and the Sequence Object

SQL Server supports two built-in solutions to automatically generate keys: the identity column prop-

erty and the sequence object. The identity property has been supported for as long as I can remem-

ber in SQL Server. It works well for some scenarios, but it also has many shortcomings. The sequence 

object was added in SQL Server 2012, and it resolves many of the identity property’s limitations. I’ll 

start with identity.



Identity

SQL Server allows you to define a property called identity for a column with any numeric type with a 

scale of zero (no fraction). This property generates values automatically upon INSERT based on a seed 

(first value) and an increment (step value) that are provided in the column’s definition. Typically, you 

would use this property to generate surrogate keys, which are keys that are produced by the system 

and are not derived from the application data.

www.it-ebooks.info




Download 10,93 Mb.

Do'stlaringiz bilan baham:
1   ...   297   298   299   300   301   302   303   304   ...   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