MS SQL Server中很简单, 类似如下:
insert into c (fd1,fd2,fd3)
select a.fd1,a.fd2,b.fd3 from a,b where a.fd1=b.df1

解决方案 »

  1.   

    呵,INFORMIX没做过:)
    SQL 有人回答了
      

  2.   

    insert into c (fd1,fd2,fd3)
    select a.fd1,a.fd2,b.fd3 from a,b where 这两行是标准select语句。。
      

  3.   

    谢谢回复!
    现在是这样,我可以将我需要的数据读到一个临时表中,可要写到一个物理表中却不成功,鉴于表对表操作应该是效率最高的,打算通过一条select语句来解决,请不胜赐教!!!select A.*,B.addr from table1 A,outer table2 B
    where A.name = "csdn" 
    and A.topic = B.topic
    order by A.seq 
                      into temp tmp_table ;
      

  4.   

    可以这么做:
     create Ctab 
     as
     select a.*,b.* from Atab(A表),btab(B表)
     where a.name = 条件
     and b.name = 条件
     这样建立一个临时表C,然后给表改名
      

  5.   

    -------------
    select A.*,B.addr from table1 A,outer table2 B
    where A.name = "csdn" 
    and A.topic = B.topic
    order by A.seq 
                      into temp tmp_table ;
    ----------------------
    能输出到临时表,也应该能够输出到物理表;除非物理表中的字段类型不匹配
      

  6.   

    select into 语句写到物理表当然不成功,我估计你说的物理表是指的已存在的表,而临时表是不存在的表,select into 是会创建一个指定名称的表的。
    如果是已存在的物理表,建议还是使用insert t1(f1,f2) select * from t2格式。
      

  7.   

    我的意思是说,装入数据的同时也是建立一个实际存在的表的过程,原来是 "temp"的,并不能进行操作的,现在不是,是生成一个实际存在的表。去掉"temp"也并不成功!
      

  8.   

    insert into c(...,addr)
    select A.*,B.addr from table1 A,outer table2 B
            where A.name = "csdn" 
            and A.topic = B.topic
            order by A.seq ;