我用的后台数据库是informix7.31,想问一下,怎样使用一条SQL语句把DB1的一个表及数据导入到DB2中。类如:insert into DB1.table1 select * from DB2.table,但语法错误。在SQL及Oracle里又是怎样实现呢?
各位同行,你们平时用D5进行这种操作时又是怎么处理的呢?我现在是做成b/s结构,用的socketconnection及 clientdataset。

解决方案 »

  1.   

    你看一下mssql book online: sp_addlinkedserver有没有讲到这方面的东东,应该可以吧。
      

  2.   

    about sql server you can do it with this method
    slect */column into newtablename from oldtablename where condition
    Notice:the newtablename is not exist;
    about DB2 or Informix ,sorry i have not seen.
      

  3.   

    informix7.31本身就有工具啊,如果表结构一样,可以用dbaccess将数据备份到文件中,然后将文件倒入另一数据库中。(savetofile,loadfromfile)