Retrieve additional error information: sysmessages table : sysmessages « System « SQL Server / T-SQL






Retrieve additional error information: sysmessages table


1> -- Retrieve additional error information: sysmessages table
2>
3>
4> SELECT 5 / 0
5> SELECT * FROM master.dbo.sysmessages WHERE error = @@ERROR
6> GO
Msg 8134, Level 16, State 1, Server JAVA2S\SQLEXPRESS, Line 4
Divide by zero error encountered.
error       severity dlevel description
                                                                                                        msglangid
----------- -------- ------ ----------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------- ---------
       8134       16      0 Divide by zero error encountered.
                                                                                                             1033

(1 rows affected)
1>
           
       








Related examples in the same category

1.SELECT TOP 10 * FROM master.dbo.sysmessages