伪代码
select [test].[numOnly]('44--(*)"*()£hllk564kkj3') as 'lala'
答案 0 :(得分:0)
这是一个经过测试的优秀解决方案:85000行<5秒
private void BulkSaveCsvData(DataTable dt, string destinationTableName)
{
using (var bulkCopy = new SqlBulkCopy(_dbConnecion, SqlBulkCopyOptions.Default))
{
foreach (DataColumn col in dt.Columns)
{
bulkCopy.ColumnMappings.Add(col.ColumnName, col.ColumnName);
}
bulkCopy.BulkCopyTimeout = 600;
bulkCopy.DestinationTableName = destinationTableName;
bulkCopy.WriteToServer(dt);
}
}