How to insert data in MySQL? | Eklavya Online

How to insert data in MySQL?

We can insert data in a MySQL table using the INSERT STATEMENT. This statement allows us to insert single or multiple rows into a table. The following is the basic syntax to insert a record into a table:

INSERT INTO table_name ( field1, field2,…fieldN )
VALUES ( value1, value2,…valueN );
If we want to insert more than one rows into a table, use the below syntax:

INSERT INTO table(field1, field2,…fieldN)
(value1, value 2, …),
(value1, value2, …),

(value1, value2, …);