Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Insert Multiple Records using a Single insert statement


Insert Multiple Records using a Single insert statement

Author
Message
kharbanda.vikram
kharbanda.vikram
Forum Newbie
Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: General Forum Members
Points: 0 Visits: 10
Comments posted to this topic are about the item Insert Multiple Records using a Single insert statement
nithiyanandam-447806
nithiyanandam-447806
SSC Rookie
SSC Rookie (47 reputation)SSC Rookie (47 reputation)SSC Rookie (47 reputation)SSC Rookie (47 reputation)SSC Rookie (47 reputation)SSC Rookie (47 reputation)SSC Rookie (47 reputation)SSC Rookie (47 reputation)

Group: General Forum Members
Points: 47 Visits: 292
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search