MySQL INSERT
DotColor - Color by Number - Peishu Su
Example 3: inserting multiple records
Here, we are going to insert record in the "cus_tbl" table of "customers" database.
INSERT INTO cus_tbl (cus_id, cus_firstname, cus_surname) VALUES (5, 'Ajeet', 'Maurya'), (6, 'Deepika', 'Chopra'), (7, 'Vimal', 'Jaiswal');
Example 2: for partial fields
In such case, it is mandatory to specify field names.
INSERT INTO emp(id,name) VALUES (7, 'Sonoo');
In such case, it is mandatory to specify field names.
INSERT INTO emp(id,name) VALUES (7, 'Sonoo');
Example 3: inserting multiple records
Here, we are going to insert record in the "cus_tbl" table of "customers" database.
INSERT INTO cus_tbl (cus_id, cus_firstname, cus_surname) VALUES (5, 'Ajeet', 'Maurya'), (6, 'Deepika', 'Chopra'), (7, 'Vimal', 'Jaiswal');

Comments
Post a Comment