Skip to content

Commit cd9069c

Browse files
committed
updated readme
1 parent ad9af3b commit cd9069c

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MySQL cheatsheet
22

3-
I have even uploaded the .sql file which you can run and directly run them in the sql prompt.
3+
I have even uploaded the .sql file which you can download and directly run them in the sql prompt.
44

55
### General Commands
66
To run sql files
@@ -104,3 +104,35 @@ drop table department;
104104
```sql
105105
drop database cheatsheet;
106106
```
107+
## Data Manipulation Language (DMl)
108+
109+
#### Insertion (Complete)
110+
```sql
111+
insert into employee (employee_id, first_name, last_name, dept_number, age, salary) values (1, "Anurag", "Peddi", 1, 20, 93425.63);
112+
113+
insert into employee values (2, "Anuhya", "Peddi", 2, 20, 83425.63);
114+
```
115+
#### Insertion (Partial)
116+
```sql
117+
insert into employee (employee_id, first_name) values (3, "Vageesh");
118+
```
119+
120+
#### Updating all rows
121+
```sql
122+
update employee set salary = 1.1 * salary;
123+
```
124+
125+
#### Updating a specified row
126+
```sql
127+
update employee set salary = 1.2 * salary where employee_id = 1;
128+
```
129+
130+
#### Delete a specified row
131+
```sql
132+
delete from employee where employee_id = 2;
133+
```
134+
135+
#### Delete all rows
136+
```sql
137+
delete from employee;
138+
```

0 commit comments

Comments
 (0)