您可以使用在SQL Server引入插入記錄的新方法2008年
insert into @MyTable
(Column1, Column2, Column3, Column4, Column5, Column6) values
(1, 2, 3, 4, cast(6 as numeric(38,8))), 6),
(1, 2, 3, 4, cast(6 as numeric(38,8))), 6),
(1, 2, 3, 4, cast(6 as numeric(38,8))), 6),
(1, 2, 3, 4, cast(6 as numeric(38,8))), 6),
(1, 2, 3, 4, cast(6 as numeric(38,8))), 6)
你需要保持與數據一致的列名並且當您的頁面數量超過適合頁數時,您可以重新插入或在適當的位置添加列註釋行
insert into @MyTable
(Column1, Column2, Column3, Column4, Column5, Column6) values
(1, 2, 3, 4, cast(6 as numeric(38,8))), 6),
(1, 2, 3, 4, cast(6 as numeric(38,8))), 6),
(1, 2, 3, 4, cast(6 as numeric(38,8))), 6),
--(Column1, Column2, Column3, Column4, Column5, Column6) values
(1, 2, 3, 4, cast(6 as numeric(38,8))), 6),
(1, 2, 3, 4, cast(6 as numeric(38,8))), 6)
您也可以將數據保存在實際表中並改爲更新表。使用一些工具來編寫該表中的插入腳本。例如,在Server Management Studio中生成腳本。
你正在使用哪個數據庫(以及哪個版本)? – Oded
修復圖像.. – ascanio
SQL Server 2008,但基本上這些腳本附加到我的項目 這是在c#visual studio 2010中的類庫 – Erez