You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/t-sql/functions/error-state-transact-sql.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ ERROR_STATE ( )
64
64
### A. Using ERROR_STATE in a CATCH block
65
65
The following example shows a `SELECT` statement that generates a divide-by-zero error. The state of the error is returned.
66
66
67
-
```
67
+
```sql
68
68
BEGIN TRY
69
69
-- Generate a divide by zero error
70
70
SELECT1/0;
@@ -78,7 +78,7 @@ GO
78
78
### B. Using ERROR_STATE in a CATCH block with other error-handling tools
79
79
The following example shows a `SELECT` statement that generates a divide-by-zero error. Along with the error state, information that relates to the error is returned.
80
80
81
-
```
81
+
```sql
82
82
BEGIN TRY
83
83
-- Generate a divide-by-zero error.
84
84
SELECT1/0;
@@ -100,7 +100,7 @@ GO
100
100
### C. Using ERROR_STATE in a CATCH block with other error-handling tools
101
101
The following example shows a `SELECT` statement that generates a divide-by-zero error. Along with the error state, information that relates to the error is returned.
0 commit comments