SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Sequences I


Sequences I

Author
Message
Tom Thomson
Tom Thomson
SSC Guru
SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)

Group: General Forum Members
Points: 50324 Visits: 13149
Nice question. It's good to see some SQL 2012 stuff now and again.

I saw 0, 1, min(int), min(bigint) presented as options and decided I would have to find it in BoL; obviously if it had been a methematician who designed it I could forget about 1, but 0 was maybe possible (although far from optimal) and the thing would probably have type-flexibility (to cater for very long sequences when needed at the same time as allowing small numbers when vl sequences weren't needed) but that flexibility meant that the choice of which type would be default wasn't really constrained beyond the requirement for an integer type. So I had to find it in BoL instead of being able to guess the answer by applying common sense, which meant I did some useful reading again, which in turn meant that I thought it was a good question.

Tom

Andre Guerreiro
Andre Guerreiro
SSCarpal Tunnel
SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)

Group: General Forum Members
Points: 4163 Visits: 1517
I chose "1" as the default start value because I thought it would have the same behaviour of the IDENTITY property which defaults to "start with 1, increment 1". Seems I must study more closely this welcome new feature.

That means one less problem converting code to/from Oracle. :-)

Best regards,

Andre Guerreiro Neto

Database Analyst
http://www.softplan.com.br
MCITPx1/MCTSx2/MCSE/MCSA
andy mack
andy mack
SSC Veteran
SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)

Group: General Forum Members
Points: 236 Visits: 87
Nice question. Got it wrong and learned something in the process Smile And sequences will be SQL 2012 exam questions so this is a great help.
Britt Cluff
Britt Cluff
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3283 Visits: 253
Good question on a new feature. Thanks for submitting.

http://brittcluff.blogspot.com/
Hardy21
Hardy21
SSCertifiable
SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)

Group: General Forum Members
Points: 5530 Visits: 1399
Britt Cluff (4/23/2012)
Good question on a new feature. Thanks for submitting.
+1

Thanks
demonfox
demonfox
Hall of Fame
Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)

Group: General Forum Members
Points: 3623 Visits: 1192
I don't have 2012 yet , I went through msdn
http://msdn.microsoft.com/en-us/library/ff878091.aspx
I thought the answer would be min(bigint)+1 ; and that wasn't listed ; didn't understand the defaults ..
guess need to dig out more..

~ demonfox
___________________________________________________________________
Wondering what I would do next , when I am done with this one Ermm
Dineshbabu
Dineshbabu
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1896 Visits: 569
Before answering referred BOL many times, so i got it correct..

--
Dineshbabu
Desire to learn new things..
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search