Skip to content

Commit bf5ab00

Browse files
committed
Add Except and Exists update pattern
1 parent d82faa7 commit bf5ab00

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

SQL Server Name Convention and T-SQL Programming Style.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ SQL Server T-SQL Coding Conventions, Best Practices, and Programming Guidelines.
475475
```
476476
sqlcmd -S MSSQLSERVER$EXPRESS -Q "dbcc checkdb ('master') with DATA_PURITY, NO_INFOMSGS;" -U maintenanceUser -P ""weirdPassword
477477
```
478+
- Only update rows that changed? Try using `EXISTS` and `EXCEPT` for perfomance reasons and code readanlity.More details [here](https://chadbaldwin.net/2020/12/30/only-update-rows-that-changed).
478479
- Use `EXISTS` or `NOT EXISTS` if referencing a subquery, and `IN` or `NOT IN` when have a list of literal values.
479480
More details [here](https://www.brentozar.com/archive/2018/08/a-common-query-error/).
480481
- For concatenate unicode strings:

0 commit comments

Comments
 (0)