1
0
Fork 0
mirror of https://github.com/treffynnon/sqlstyle.guide.git synced 2025-03-09 12:49:51 -05:00

Merge pull request #2 from dmlyons2/patch-1

Moved comment examples to under the Do heading
This commit is contained in:
Simon Holywell 2016-09-01 09:03:00 +10:00 committed by GitHub
commit b38eef4cb4

View file

@ -36,18 +36,6 @@ Based on a work at [http://www.sqlstyle.guide][self].
closing `*/` where possible otherwise preceed comments with `--` and finish
them with a new line.
### Avoid
* CamelCase—it is difficult to scan quickly.
* Descriptive prefixes or Hungarian notation such as `sp_` or `tbl`.
* Plurals—use the more natural collective term where possible instead. For example
`staff` instead of `employees` or `people` instead of `individuals`.
* Quoted identifiers—if you must use them then stick to SQL92 double quotes for
portability (you may need to configure your SQL server to support this depending
on vendor).
* Object oriented design principles should not be applied to SQL or database
structures.
```sql
SELECT file_hash -- stored ssdeep hash
FROM file_system
@ -61,6 +49,18 @@ UPDATE file_system
WHERE file_name = '.vimrc';
```
### Avoid
* CamelCase—it is difficult to scan quickly.
* Descriptive prefixes or Hungarian notation such as `sp_` or `tbl`.
* Plurals—use the more natural collective term where possible instead. For example
`staff` instead of `employees` or `people` instead of `individuals`.
* Quoted identifiers—if you must use them then stick to SQL92 double quotes for
portability (you may need to configure your SQL server to support this depending
on vendor).
* Object oriented design principles should not be applied to SQL or database
structures.
## Naming conventions
### General