表结构相同
insert database.dbo.table1 select database2.dbo.table2

解决方案 »

  1.   

    insert database.dbo.table1 values(col1,col2,col3,...) select col1,col2,co3,... from database2.dbo.table2
      

  2.   

    我的数据库是postgres
    如果是因为表名和表结构都有变化,所以直接导到文件中在导进去,好像不可以啊,至少要修改很多东西的
      

  3.   

    uats=# insert into  ipa.public.ipa_act(act_id,act_cd,act_nm)  select act_id,act_cd,act_nm from tms.public.tms_act;
    ERROR:  Cross-database references are not implemented
    uats=#