Please, tell me difference between below mysql statement:
INSERT INTO
test
(first_name,last_name,age) VALUE (:i_first_name,:i_last_name,:i_age), (:i_first_name,:i_last_name,:i_age);
and
INSERT INTO
test
(first_name,last_name,age) VALUES (:i_first_name,:i_last_name,:i_age), (:i_first_name,:i_last_name,:i_age);
Both are working fine.
If you are using Insert or Insert into both will insert the data in Table. However Insert into is basically used to fatch the data from another table using select command and insert into table where you want to insert the data.
MySQL INSERT statement is used to store or add data in MySQL table within the database. We can perform insertion of records in two ways using a single query in MySQL: Insert record in a single row. Insert record in multiple rows.
The INSERT INTO statement is used to insert new records in a table.
Insert is for adding data to the table, update is for updating data that is already in the table.
There is no difference, as you can see from the syntax rules here, both keywords are valid: http://dev.mysql.com/doc/refman/5.5/en/insert.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With