node-tds icon indicating copy to clipboard operation
node-tds copied to clipboard

Multiple rows with single insert

Open gitfy opened this issue 13 years ago • 1 comments

Hi, I am trying to find a way to do parameterized insert of multiple records in a single insert call.

Is this even possible. How do i defined the parameters, should they like

INSERT INTO TABLE values (@column11, @column21, ..), (@column21, @column22...) and send the values to the paramters in { @column11, @column12, ..... }

or there is a better way of do it.

Any help is appreciated. Thanks.

gitfy avatar May 10 '12 20:05 gitfy

Since this is simply a protocol to SQL Server, it only supports what a normal query supports.

Having said that, bulk inserts are on the menu

cretz avatar May 11 '12 16:05 cretz