Home Sql Mysql-example SQL Bulk Insert
Questions:Ask|Latest

 
 

Share on Google+Share on Google+

SQL Bulk Insert

Advertisement
SQL Bulk Insert is performed when you insert a records or row to a table in a bulk.

SQL Bulk Insert

     

SQL Bulk Insert is performed when you insert a records  or row to a table in a bulk.

Understand with Example

The Tutorial covers an example from 'SQL Bulk Insert'. To understand and grasp example we create a table 'Stu_Table' with required fieldnames and datatypes respectively.

 

 

 

 

Create Table Stu_Table

Create Table Stu_Table( Stu_Id int, Stu_Name varchar(15),Stu_Class());

Insert Data Into Stu_Table

The bulk values of  records or rows are inserted into table 'stu_table'. 

insert into stu_table values
			(1, 'Komal',10),
			(2, 'Ajay',10),
			(3, 'Santosh',10),
			(4, 'Rakesh',10),
			(5, 'Bhau',10);
insert into stu_table values
			(1, 'aaa',11),
			(2, 'bbb',11),
			(3, 'ccc',11),
			(4, 'ddd',11),
			(5, 'eee',11);
insert into stu_table values
			(1, 'iii',12),
			(2, 'jjj',12),
			(3, 'kkk',12),
			(4, 'lll',12),
			(5, 'mmm',12);

Stu_Table

+--------+----------+-----------+
| Stu_Id | Stu_Name | Stu_Class |
+--------+----------+-----------+
| 1      | Komal    | 10        |
| 2      | Ajay     | 10        |
| 3      | Santosh  | 10        |
| 4      | Rakesh   | 10        |
| 5      | Bhau     | 10        |
| 1      | aaa      | 11        |
| 2      | bbb      | 11        |
| 3      | ccc      | 11        |
| 4      | ddd      | 11        |
| 5      | eee      | 11        |
| 1      | iii      | 12        |
| 2      | jjj      | 12        |
| 3      | kkk      | 12        |
| 4      | lll      | 12        |
| 5      | mmm      | 12        |
+--------+----------+-----------+

 

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: January 20, 2009

Related Tutorials

Ask Questions?    Discuss: SQL Bulk Insert  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com