SQL statement Summary of BULK INSERT data for MS SQL Server database:
The first type:
Insert into Tb_namelist (name,insertdate,updatedate)
VALUES (' AA ', GETDATE (), GETDATE ())
Insert into Tb_namelist (name,insertdate,updatedate)
VALUES (' BB ', GETDATE (), GETDATE ())
Insert into Tb_namelist (name,insertdate,updatedate)
VALUES (' CC ', GETDATE (), GETDATE ())
In this way, all the statements are written, once executed, in fact, and a single insert is the same.
The second type:
Insert into Tb_namelist (name,insertdate,updatedate)
VALUES (' AA ', GETDATE (), GETDATE ()), (' BB ', GETDATE (), GETDATE ()),
(' CC ', GETDATE (), GETDATE ())
This can be written less than a lot of SQL statements, as long as the values of the order are written clear OK.
The third type:
Insert into Tb_namelist (name,insertdate,updatedate)
Select ' DD ', GETDATE (), GETDATE () union ALL
Select ' EE ', GETDATE (), GETDATE () union ALL
Select ' FF ', GETDATE (), GETDATE ()
With UNION all, it is said to be faster than the second, but the field is simple, the amount of data is less effective
SQL BULK INSERT Data