1st method:
INSERT INTO table_name VALUES (value1, value2, value3....);
2nd method:
specifies both the column name and values which you want to insert.
INSERT INTO table_name (column1, column2, column3....) VALUES (value1, value2, value3.....);
=======================================================================
With "Select" Statement
can copy all the data of a table and insert into in a different table.
insert into 2nd_table select * from first_table;
Specific Columns from different table
insert into 2nd_table (col1, col2) select col1,col2 from furst_Table;
Ex:
insert into employee2(emp_id, first_name) select emp_id, first_name from employee where salary>5000;
=======================================================================
Insert Multiple Values
CREATE TABLE student(ID INT,Name VARCHAR(20),Percentage INT,Location VARCHAR(20),DateOfBirth DATE);
INSERT INTO student(ID,Name,Percentage,Location,DateOfBirth) VALUES (1,'Manthan Koli',79,'Delhi','05-JUN-03');
INSERT INTO student(ID,Name,Percentage,Location,DateOfBirth) VALUES (2,'Dev Dixit',75,'Pune','05-JUN-03');
in MySQL:
INSERT INTO student(ID,Name,Percentage,Location,DateOfBirth)
VALUES
(2,'Dev Dixit',75,'Pune','1999-06-17')
(3,'Aakash Deshmukh',87,'Mumbai','1997-09-12'),
(4,'Aaryan Jaiswal',90,'Chennai','2005-10-02');