1.一個一個TABLE去點,匯出Scripts
2.SQL Server 匯出script (可選取多個table,一次匯出
資料庫右鍵/Tasks/Generate Scripts
SELECT distinct top 1 TABLE_NAME,'select top 1 * into test.'+TABLE_NAME + ' from '+TABLE_SCHEMA+'.'+ TABLE_NAME
FROM icrm.INFORMATION_SCHEMA.COLUMNS
ORDER BY TABLE_NAME
1.一個一個去點table匯出script
2.
select distinct 'select top 1 * into ooo.'+tname+' from '+creator+'.'+tname +' commit;'
from sys.syscolumns where creator='xxx'
select distinct 'truncate table '+creator+'.'+tname +' commit;'
from sys.syscolumns where creator='ooo'