Sequences III

  • Stephen_W_Dodd

    SSCommitted

    Points: 1618

    +1

  • Dave62

    SSCertifiable

    Points: 6707

    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:

  • mtassin

    SSC-Insane

    Points: 23099

    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.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • sknox

    SSChampion

    Points: 12294

    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...

  • SQLRNNR

    SSC Guru

    Points: 281252

    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

  • Koen Verbeeck

    SSC Guru

    Points: 258985

    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

  • Rose Bud

    SSCrazy

    Points: 2971

    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!

  • Iulian -207023

    SSCertifiable

    Points: 7509

    thanks, easy one

    Iulian

  • Britt Cluff

    SSCertifiable

    Points: 5083

    Good question. Thanks for submitting.

    http://brittcluff.blogspot.com/

  • Dineshbabu

    Hall of Fame

    Points: 3220

    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 25 (of 25 total)

You must be logged in to reply to this topic. Login to reply