MySQL Tutorial





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
Mysql Tutorial
Introduction
How to Install
Database
Datatypes
Tables
INSERT
SELECT
UPDATE
DELETE
Operators
Functions
Ask Your Doubts
Feedback
 





Insert Multiple rows into Mysql


Tutorials Mysql

Topic
How to insert multiple rows into MySQL database table?


Explanation

Multiple Rows :

    We can insert multiple rows into MySQL table using a single INSERT statement.

The Syntax is

INSERT INTO tbl_name(col_name1, col_name2,...) VALUES(expr1, expr2,.....;), (expr1a, expr2a,.....;)

Example :

mysql> insert into student(studid,name,marks,address,phone) 
values(3,'michael',75,'edinburgh',2598234),
(4,'jack',82,'victoria street',2436821),
(5,'anne',100,'downing street',2634821);
Query OK, 3 rows affected (0.00 sec)
Records: 3  Duplicates: 0  Warnings: 0 
    This query will be useful while inserting large amount of data into a specific table.




A Note

MySQL is the most popular open source Relational database Management system (RDBMS). Being a open source anyone can use and change the software for their needs. Hope you enjoy this tutorial. We welcome your Valuable feedbacks or suggestions on this MySQL tutorial. This is a copyright content.


Other Links

web hosting