数据库中批量插入数据的方法

来源:互联网 发布:node.js搭建 编辑:程序博客网 时间:2024/05/21 09:11

If using SQL Server, SqlBulkCopy.WriteToServer(DataTable)

  • SqlBulkCopy.WriteToServer Method (DataTable)

Or also with SQL Server, you can write it to a .csv and use BULK INSERT

  • BULK INSERT (Transact-SQL)

If using MySQL, you could write it to a .csv and use LOAD DATA INFILE

  • LOAD DATA INFILE Syntax

If using Oracle, you can use the array binding feature of ODP.NET

  • Bulk Insert to Oracle using .NET

If SQLite:

  • How do I bulk insert with SQLite?
  • Faster bulk inserts in sqlite3?
原创粉丝点击