Try Catch Throw

  • wish.mannat (6/11/2015)


    Why am i getting these two errors on executing?

    Msg 102, Level 15, State 1, Procedure MyProc, Line 16

    Incorrect syntax near 'THROW'.

    Msg 2812, Level 16, State 62, Line 1

    Could not find stored procedure 'dbo.MyProc'.

    For the first error: Check the version of SQL Server you are running and the compatibility level. Maybe you use an old version that doesn't support TRY CATCH yet?

    For the second error: The first error caused the CREATE PROC statement to fail, so the next batch that tries to execute it will naturally fail as well.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

Viewing post 31 (of 30 total)

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