Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Insert Multiple Records using a Single insert statement Expand / Collapse
Author
Message
Posted Saturday, November 14, 2009 11:54 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, November 27, 2009 11:17 AM
Points: 0, Visits: 10
Comments posted to this topic are about the item Insert Multiple Records using a Single insert statement
Post #819036
Posted Wednesday, June 30, 2010 9:06 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Yesterday @ 3:26 AM
Points: 47, Visits: 285
hi vikram ,
Pls don't waste others time




your article --- what is this ?

Insert Multiple Records using a Single insert statement
By vikram kharbanda,
Total article views: 156 | Views in the last 30 days: 25
Rate this | Join the discussion | Briefcase | Print

1.)Rght Click on the database that contains the your original table.

2.) Open new Query Window

3.)Paste this into query

5.)Replace the YourDATBSE with your own databse

6.)Replace the MYTableNAME with your own tabl name


USE YourDATBSE
GO
INSERT INTO MYTableNAME (FirstColoumn, SecondColoumn)
VALUES ('FirstRec',1);
INSERT INTO MYTableNAME (FirstColoumn, SecondColoumn)
VALUES ('SecondRec',2);
INSERT INTO MYTableNAME (FirstColoumn, SecondColoumn)
VALUES ('ThirdREC',3);
INSERT INTO MYTableNAME (FirstColoumn, SecondColoumn)
VALUES ('FourthREC',4);
INSERT INTO MYTableNAME (FirstColoumn, SecondColoumn)
VALUES ('FifthREC',5);
GO


Post #945583
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse