Click here to Skip to main content
15,909,939 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to insert more than one record in sql server 2005 using c#.net using single insert statement
Posted

 
Share this answer
 
Comments
Uday P.Singh 14-Jul-11 9:03am    
my 5!
Sunasara Imdadhusen 14-Jul-11 9:14am    
thanks
Assuming that TABLE_1 has two columns (this sample uses two that are varchar(10))
then use

SQL
INSERT INTO TABLE_1
SELECT 'ONE', 'TWO'
UNION
SELECT 'THREE', 'FOUR'
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900