The INSERT statement is used to insert the data in the Database Table.
| INSERT INTO Employee VALUES('Column1','Column2','Column3', '.....') |
Now we have Employee Table and we want to insert New Record the table.
| Emp_id | Name | Surname | Salary | Dept_id |
| 1 | Rajesh | Khanna | 45000 | 2 |
| 2 | Sneha | Gupta | 55000 | 4 |
| 3 | Sandeep | Nehte | 95000 | 1 |
| 4 | Kirti | Patil | 25000 | 3 |
Syntax For SQL:
| INSERT INTO Employee VALUES('5', 'Nilesh','Jadhav','45000', '3') |
| Emp_id | Name | Surname | Salary | Dept_id |
| 1 | Rajesh | Khanna | 45000 | 2 |
| 2 | Sneha | Gupta | 55000 | 4 |
| 3 | Sandeep | Nehte | 95000 | 1 |
| 4 | Kirti | Patil | 25000 | 3 |
| 5 | Nilesh | Jadhav | 45000 | 3 |
After Execute:
(1 row(s) affected)
(0 ms taken)
(1 row(s) affected)
(0 ms taken)
No comments:
Post a Comment