IT Community - Software Programming, Web Development and Technical Support

Insert Multiple records using single Insert Statement

This is a discussion on Insert Multiple records using single Insert Statement within the Database Support forums, part of the Web Development category; Hi, This is the simple way to insert multiple records using a single Insert Statement. Use YourDB GO INSERT INTO ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Database Support

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 03-04-2008, 09:26 PM
vadivelanshanmugam vadivelanshanmugam is offline
D-Web Trainee
 
Join Date: Jan 2008
Posts: 41
vadivelanshanmugam is on a distinguished road
Default Insert Multiple records using single Insert Statement

Hi,

This is the simple way to insert multiple records using a single Insert Statement.

Use YourDB
GO
INSERT INTO MyTable (FirstCol, SecondCol)
VALUES ('First',1);
INSERT INTO MyTable (FirstCol, SecondCol)
VALUES ('Second',2);
INSERT INTO MyTable (FirstCol, SecondCol)
VALUES ('Third',3);
INSERT INTO MyTable (FirstCol, SecondCol)
VALUES ('Fourth',4);
INSERT INTO MyTable (FirstCol, SecondCol)
VALUES ('Fifth',5);
GO
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to insert data from a csv file into a SQL server database? $enthil Database Support 7 05-01-2008 09:45 PM
Delete records from multiple table at a time Falcon Database Support 7 04-07-2008 12:12 AM
How do I insert javascript in php code? itbarota PHP Programming 1 09-12-2007 12:08 AM
What is Bulk Insert in sql? oxygen Database Support 7 08-03-2007 12:31 PM
Update / Insert in a single query priyan Database Support 1 07-25-2007 07:17 AM


All times are GMT -7. The time now is 01:58 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0