THROW defaults

  • Comments posted to this topic are about the item THROW defaults

  • Interesting question, thanks.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • +1

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • That was an easy question. πŸ™‚ Thank you for that point.

    /HΓ₯kan Winther
    MCITP:Database Developer 2008
    MCTS: SQL Server 2008, Implementation and Maintenance
    MCSE: Data Platform

  • This was removed by the editor as SPAM

  • Nice question. But the answer turned up in comments on last weeks raiserror question, so it was a bit easy for anyone who had read that.

    Tom

  • Arrrrrgggghh.... Had it but then I changed my mind.

    Thanks, Steve.

    ---------------
    Mel. 😎

  • I understand the THROW to match error handling in other languages, but I still use RAISERROR. You get to define you own severity and you can use it in place of a PRINT statement to bypass the buffering of printed messages.

  • Thanks for question.

    --rhythmk
    ------------------------------------------------------------------
    To post your question use below link

    https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
    πŸ™‚

  • Thank you for the post, Steve, nice one.

    (first I saw the options and saw 16 there and then selected it as "cool... sweet 16"... and submitted, then I read the question what this 16 I got it right?.... well, strange beginning of the week :-P)

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

  • Ed Wagner (10/6/2014)


    I understand the THROW to match error handling in other languages, but I still use RAISERROR. You get to define you own severity and you can use it in place of a PRINT statement to bypass the buffering of printed messages.

    Those are some really nice advantages

    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

  • Including SQL 2012 (In the Explanation "As of 2014"), The severity is set to 16.

  • Thanks for the relatively easy question to start the week, Steve.

  • Huh, I wonder why they are limiting throw in 2014? The raiserror documentation says to prefer throw, but it's less capable. I'm wondering if they want you to use sp_addmessage to define errors with a different severity...

  • Thanks, and it shows the value of taking time to look at what is said in the comments on questions. Taking what was said last week this was easy.

    Not all gray hairs are Dinosaurs!

Viewing 15 posts - 1 through 15 (of 18 total)

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