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
- <aid="sql-comment"></a> Always use multi-line comment `/* */` instead in-line comment `--` in production code due to potential formating problems in different tools and programs.
266
+
More details [here](https://www.brentozar.com/archive/2021/04/never-ever-ever-start-t-sql-comments-with-two-dashes/) and [here](https://sqlkover.com/ssis-and-the-ora-00907-missing-right-parenthesis-error/).
265
267
- Never use asterisk (`*`) in select statements `SELECT *` and `INSERT` statements, use explicit column names.
266
268
Main problems are: traffic issues, Memory Grants issues, Index usage issues.
267
269
**Only one exception, see it below.**
@@ -538,7 +540,6 @@ Recommendations from Microsoft: [Stored procedure Best practice][11]
538
540
- The procedure or function should begin with parameters checks (see example below)
539
541
- Create `sp_` procedures only in `master` database - SQL Server will always scan through the system catalog first
540
542
- Always use `BEGIN TRY` and `BEGIN CATCH` for error handling
541
-
- <aid="sql-comment"></a> Always use multi-line comment `/* */` instead in-line comment `--` in production code due to potential formating problems. More details [here](https://www.brentozar.com/archive/2021/04/never-ever-ever-start-t-sql-comments-with-two-dashes/).
542
543
- Use `SET NOCOUNT ON;` for stops the message that shows the count of the number of rows affected by a Transact-SQL statement and decreasing network traffic.
543
544
More details [here](https://www.red-gate.com/hub/product-learning/sql-prompt/finding-code-smells-using-sql-prompt-set-nocount-problem-pe008-pe009) and [here][11].
544
545
- Do not use `SET NOCOUNT OFF;` because it is default behavior
0 commit comments