When you use @@error and try-catch?
Answer / Ashish Gangwar
@@ERROR is a system function in SQL Server that returns the last error number encountered during execution. The TRY-CATCH block is used for error handling within Transact-SQL code.nYou can use @@ERROR inside a TRY-CATCH block to catch and handle specific errors.
| Is This Answer Correct ? | 0 Yes | 0 No |
Can we have more than one NULL in a column having unique constraint?
How global temporary tables are represented and its scope?
List the types of recovery model available in sql server?
What is a sub-query? When would you use one?
Does index slows down insert statements?
What are the different types of joins and what does each do?
what is cursor?why we will go to cursor?advantages &disadvantages of cursors?
How can you list all the columns in a database?
What is the use of builtinadministrators group in sql server? : sql server security
How and why use sql server?
Can we insert data into a view?
What does it mean if @@cursor_row returns a negative number?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)