May 1, 2012 at 12:21 pm
+1
May 1, 2012 at 12:24 pm
sknox (5/1/2012)
... you've also documented the structure completely in one place rather than relying on documentation elsewhere. This reduces the chance that someone else (a coworker or even a replacement) could misunderstand what the sequence is doing.
I don't mind documenting things for a coworker. Documenting for a replacement though, may be a little bit lower on my priority list. :Whistling:
May 1, 2012 at 12:50 pm
sknox (5/1/2012)
The problem comes in when you specify some values but leave others at default, as in this scenario, or when you haven't used a feature for a while, and think a default is A when it's actually B.
If you explicitly define each value, you not only can't easily make that kind of mistake, but you've also documented the structure completely in one place rather than relying on documentation elsewhere. This reduces the chance that someone else (a coworker or even a replacement) could misunderstand what the sequence is doing.
Or they can open up SSMS right cilck on the sequence and go to properties and see more information than you'll get anywhere.
Edit: I should qualify that... you could run a series of queries to get the info that right clicking and selecting properties does. Near as I can tell it takes 3 separate queries. It would be nice if sp_help would give all the information. Kind of sad that it doesn't.
May 1, 2012 at 2:06 pm
mtassin (5/1/2012)
sknox (5/1/2012)
The problem comes in when you specify some values but leave others at default, as in this scenario, or when you haven't used a feature for a while, and think a default is A when it's actually B.
If you explicitly define each value, you not only can't easily make that kind of mistake, but you've also documented the structure completely in one place rather than relying on documentation elsewhere. This reduces the chance that someone else (a coworker or even a replacement) could misunderstand what the sequence is doing.
Or they can open up SSMS right cilck on the sequence and go to properties and see more information than you'll get anywhere.
Edit: I should qualify that... you could run a series of queries to get the info that right clicking and selecting properties does. Near as I can tell it takes 3 separate queries. It would be nice if sp_help would give all the information. Kind of sad that it doesn't.
...IF they have SSMS or another query interface available to them...
May 1, 2012 at 4:27 pm
Sweet:cool:
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
May 1, 2012 at 11:33 pm
Nice question. A bit easy, as I know practically the syntax for Sequence by heart after the first two questions 🙂
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
May 4, 2012 at 7:39 am
This series of questions has given me a good understanding of sequences. I hope I remember this if/when my company ever upgrades to SQL Server 2012. Thanks for the intro to new features!
May 8, 2012 at 2:06 am
thanks, easy one
Iulian
May 17, 2012 at 8:02 pm
Good question. Thanks for submitting.
http://brittcluff.blogspot.com/
January 9, 2013 at 5:50 am
Still i didn't get a chance to work in 2012, But keeping property of IDENTITY and minimum value of INT in mind I answered and luckily i got it correct. I don't know what value will be returned CYCLE is mentioned.
Thanks for posting 2012 feature..
--
Dineshbabu
Desire to learn new things..
Viewing 10 posts - 16 through 24 (of 24 total)
You must be logged in to reply to this topic. Login to reply