Skip to content

Commit

Permalink
Merge pull request #7 from Prerna-Chachare/patch-3
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
thedevankit-0 authored Jul 13, 2019
2 parents 488cee8 + 7930f75 commit ec065bd
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sql Notes And Cheatsheet

## Coding Standreds
## Coding Standards
1. Use [ ] brackets to specify coloumn name in select statement.
2. Do not use SELECT * as it affects significant performance.
For. Eg. SELECT **[ID]**
Expand All @@ -20,3 +20,19 @@
**,** [NAME]
**,** [SALARY]
from Employees;
6. Execution of query should be fast so write query likewise.
7. Proper Indentation should be followed while writing the query.
8. Define Aliases to change column name to your convenient name. Used to shorten Column Names of Coulmns having large names.
9. **'AS'** keyword is used to define aliases.
For. Eg. SELECT **[Department Name]** AS **[DeptName]**
from Employees;
10. First Character of Identifier should start with **(_), (@), #**.
11. Do not use Reserved keywords for identifiers.
12. Not to use embedded special or supplementary characters.
13. When keyword & column name are same use square bracket to use column name in query.
For. Eg. SELECT [NAME]
, **[DATE]**
from Employees;
14. Temporary Table can be created using #, ## or Table Variable.
15. **;** should be specified at the termination of every statement.
16. **;** always required for Common Table Expressions and Service Broker Commands.

0 comments on commit ec065bd

Please sign in to comment.