• Definition :

Insert into statement is used to add new or fresh record/s into an existing database table.

  • Syntax :

INSERT INTO table-name (field or attribute or column-name1, column-name2, column-name3, column-name4, column-name5VALUES (value1, value2, value3, value4, value5 );(Press Enter)

  • Example :
INSERT INTO employee (emp_id, emp_name, emp_addr, emp_dept, emp_dob, emp_sal, emp_mob) VALUES ('105M', 'Rohit', 'Mumbai', 'Manager', '05/22/2020', 17500, 9334582186);(Press Enter)

--------------------------------------------  OR  ----------------------------------------

INSERT INTO employee (emp_id, emp_name, emp_addr, emp_dept, emp_dob, emp_sal, emp_mob) VALUES ("105M", "Rohit", "Mumbai", "Manager", "05/22/2020", 17500, 9334582186);(Press Enter)

--------------------------------------------  OR  ----------------------------------------

INSERT INTO employee VALUES ('105M', 'Rohit', 'Mumbai', 'Manager', '05/22/2020', 17500, 9334582186);(Press Enter)




[NB: To show table data use (Select * from employee)]

For more Select query use this link

Loading

Categories: SQL

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.