Click here to Skip to main content
15,912,493 members
Please Sign up or sign in to vote.
2.33/5 (2 votes)
See more:
i have a string variable and values in the string variable are
string query=values('Aloo','fry','54',1,5)('DalTadka','fry','34',1,5)

i want to insert these string values in a table using store procedure.
Posted
Updated 15-Nov-13 0:03am
v2

You can insert multiple records using this query posted by @Ashish_Agrawal
 
Share this answer
 
Following is the sql query to insert multiple rows to a table at a time.

SQL
Insert INTO Table1(Col1, Col2, Col3)
Values('a','b','c'),
     ('x','y','z')


You can wrap it into a stored procedure and can pass multiple rows values by comma separated as a parameter.
 
Share this answer
 
 
Share this answer
 

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