About 6,410,000 results
Open links in new tab
  1. @@ERROR (Transact-SQL) - SQL Server | Microsoft Learn

    Nov 18, 2025 · Returns an error number if the previous statement encountered an error. If the error was one of the errors in the sys.messages catalog view, then @@ERROR contains the …

  2. @@ERROR - Transact-SQL Reference Documentation

    @@ERROR returns the number of the error message until another Transact-SQL statement is executed. You can view the text associated with an @@ERROR error number in the …

  3. Error and Transaction Handling in SQL Server - sommarskog.se

    Mar 18, 2022 · When you call a stored procedure on a linked server that raises an error, this error may bypass the error handler in the procedure on the local server and go to directly to the client.

  4. sql server - @@ERROR and/or TRY - CATCH - Stack Overflow

    It has been my experience that, as per Books Online, TRY...CATCH blocks will trap all events that would generate errors (and, thus, set @@ERROR to a non-zero value).

  5. SQL Server TRY CATCH, RAISERROR and THROW for Error Handling

    May 24, 2024 · You can leverage SQL Server’s error handling capabilities to proactively identify and address potential issues, provide informative feedback to users, and ensure a robust and …

  6. How to implement error handling in SQL Server

    This article explains how to implement SQL error handling using the SQL server try-catch statement and what can be done in general when an error occurs in SQL Server

  7. Sass: @error

    Sass makes this easy with the @error rule, which is written @error <expression>. It prints the value of the expression (usually a string) along with a stack trace indicating how the current …

  8. SQL ERROR MESSAGE - Tutorial Gateway

    In SQL Server, Every error is recognized with a specific error message. This function will help us to fetch that error message when the server identifies errors during the query execution.

  9. Error Handling in SQL Server with Try Catch

    Jul 21, 2020 · Now consider the following code snippet that illustrates how an error generated inside a TRY block is handled in the CATCH block and the relevant error metadata displayed.

  10. How to get sql error in stored procedure - Stack Overflow

    Nov 30, 2012 · So, I can select @@error and get a number, but all I really want is the SQL error. Something like Hey, I couldn't do this because there is a fk constraint on this column or whatever.