Sequences III

  • +1

  • 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:

  • 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]

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

  • 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

  • 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

  • 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!

  • thanks, easy one

    Iulian

  • Good question. Thanks for submitting.

    http://brittcluff.blogspot.com/

  • 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