用sql server 2000 的DTS功能可以倒

解决方案 »

  1.   

    导出:
    EXEC master..xp_cmdshell 'bcp "select * from dbname..tablename " queryout c:\DT.txt -c -Sservername -Usa -Ppassword'
    导入:
    EXEC master..xp_cmdshell 'bcp "dbname..tablename" in c:\DT.txt -c -Sservername -Usa -Ppassword'
    这样的方法可以实现
      

  2.   

    insert table1 select * from table2
      

  3.   

    insert 库名1..表名1 select * from 库名2..表名2或:insert 库名1..表名1 (列名1,列名2) select 列名1,列名2 from 库名2..表名2
      

  4.   

    select * into 库名1..表名1 from 库名2..表名2