日期:2014-05-17 浏览次数:20450 次
INSERT INTO tablename
SELECT 1, '班级1' UNION ALL
SELECT 2, '班级2' UNION ALL
SELECT 3, '班级3'
using (SqlBulkCopy bcp = new SqlBulkCopy(pConn, SqlBulkCopyOptions.FireTriggers, pTrans))
{
bcp.DestinationTableName = "temp_" + tableName;
bcp.WriteToServer(data);
}