Skip to content

Commit 98daa37

Browse files
authored
Update README.md
1 parent 64aa64a commit 98daa37

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
A collection of amazing coding patterns in no particular order.
33

44
## Check before proceding
5-
Explicity validation to ensure the object, variable or component is in the expected state.
5+
Explicit validation to ensure the object, variable or component is in the expected state.
66

77
### Check if a object exists
88
You might want to check if a object already exist before creating it. You can use this patterns for table, procedures or any object in the database.
@@ -41,6 +41,7 @@ DECLARE @NewLineChar AS CHAR(2) = CHAR(13) + CHAR(10);
4141
```
4242

4343
### Error handling
44+
A elegant sample of using error handling in T-SQL with `TRY/ CATCH` and the explicit transactions statements: `BEGIN TRANSACTION`, `COMMIT` and `ROLLBACK`. You should set XACT_ABORT to ON to raise a run-time error so the entire transaction is terminated and rolled back.
4445
```sql
4546
SET NOCOUNT, XACT_ABORT ON;
4647
DECLARE @ErrorMessage NVARCHAR(4000), @rows INT;
@@ -61,6 +62,9 @@ BEGIN CATCH
6162
THROW;
6263
END CATCH;
6364
```
65+
### Log into errorlog
66+
67+
### Use the database context
6468

6569
## Data manipulation
6670
```sql

0 commit comments

Comments
 (0)