Skip to content

Commit 7930f75

Browse files
author
Prerna-Chachare
authored
Update README.md
1 parent 488cee8 commit 7930f75

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Sql Notes And Cheatsheet
22

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

0 commit comments

Comments
 (0)