in MySQL there is this syntax for using a single insert for multiple records:
is there similar syntax in MS SQL Server 2000 ?
i came up with
but im not sure about its performance.
another approach i discovered is in : passing a string with delimited values, parsing and inserting, but wanted to see other ways.
my case is an Application in c#, passing the values in an xml to the DB, but with large xmls it ... chokes...
------------------------
Code:
INSERT INTO x (a,b)
VALUES
('1', 'one'),
('2', 'two'),
('3', 'three')
i came up with
Code:
insert (a, b)
select '1', 'one'
union
select '2', 'two'
union
select '3', 'three'
but im not sure about its performance.
another approach i discovered is in : passing a string with delimited values, parsing and inserting, but wanted to see other ways.
my case is an Application in c#, passing the values in an xml to the DB, but with large xmls it ... chokes...
------------------------