Skip to content

Commit da1ce06

Browse files
authored
Merge pull request Cheatsheet-lang#7 from CodeWithBishal/master
added more snippets to the cheatsheet
2 parents 7c808f3 + 851b8eb commit da1ce06

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,92 @@ To run sql files
88
source <filename>.sql;
99
```
1010

11+
## Data Types
12+
13+
#### Integers
14+
15+
```sql
16+
INT
17+
```
18+
```sql
19+
TINYINT
20+
```
21+
```sql
22+
SMALLINT
23+
```
24+
```sql
25+
MEDIUMINT
26+
```
27+
```sql
28+
BIGINT
29+
```
30+
31+
#### Float
32+
33+
```sql
34+
FLOAT(M,D)
35+
```
36+
37+
#### Double
38+
39+
```sql
40+
DOUBLE(M,D)
41+
```
42+
43+
#### Decimal
44+
45+
```sql
46+
DECIMAL(M,D)
47+
```
48+
49+
#### Date
50+
51+
```sql
52+
DATE -- Format - (YYYY-MM-DD)
53+
```
54+
55+
#### Date Time
56+
57+
```sql
58+
DATETIME -- Format - (YYYY-MM-DD HH:MM:SS)
59+
```
60+
61+
#### Time
62+
63+
```sql
64+
TIME -- Format - (HH:MM:SS)
65+
```
66+
67+
#### String
68+
69+
```sql
70+
CHAR(M)
71+
```
72+
73+
```sql
74+
VARCHAR(M)
75+
```
76+
77+
```sql
78+
BLOB or TEXT
79+
```
80+
81+
## Comments
82+
83+
```sql
84+
/* Multi
85+
line
86+
comment */
87+
```
88+
89+
```sql
90+
# Single Line Comment
91+
```
92+
93+
```sql
94+
-- Single Line Comment
95+
```
96+
1197
## Data Definition Language (DDL)
1298

1399
#### Create Database

0 commit comments

Comments
 (0)