How to add data to a table with a Primary Key (when you need to ignore this primary key) SET IDENTITY_INSERT tableA ON -- Now you can make a list of fields with Primary Key and add records like: INSERT Into tableA ([id], [c2], [c3], [c4], [c…
I've been interested in this question for a long time! How can I do it? Insert multiple rows into a table with one query. The thing is that in the InterBase DBMS, unlike many other DBMS, a query of the type:
Adding Records to a Table Ignoring IDENTITY: -- Enable SET IDENTITY_INSERT tableA ON -- You must specify the full list of columns for INSERT: INSERT Into tableA ([id], [c2], [c3], [c4], [c5] ) SELECT [id], [c2], [c3], [c4], [c5] FROM tableB...
Often there is a need to pass a set of data to a procedure at once, in this publication, an example of how to do this in C# for the MSSQL database will be given. We will use the usual way of calling a procedure without any frameworks. First, let's create a test table in the database