如何 将一个表中查询的结果存储到另一个新建的数据库表中或临时表中去
用 select  into 可以吗

解决方案 »

  1.   

    另一个指的是数据库还是同一个数据库中的表..
    insert into b select .... from a
      

  2.   

    在oracle中是不行的
    你可以用insert into table_name
           select * from table_name@database_link
    或者用copy from
      

  3.   

    没有表结构,可以用:
    create table temp as select * from 表 where 条件1,条件2....
      

  4.   

    同一个数据库中:insert into table1 select * from table2
    不同数据库:建立数据链接,select * from table2@dblink类似这样
      

  5.   

    在oracle中不能使用select into操作,应该使用copy from或者直接create table newtablename as创建表吧
      

  6.   

    在oracle中不能使用select into操作 (可以这样用的啊 我刚才试过了啊)
      

  7.   

    select into 和 insert into的区别
    现有表t1, t2 select into: select * into t3 from t1; 也就是说select into会将查询结果保存到临时表t3中 insert into: insert into t2(column1, column2, ....) select column1, column2, .... from t1 insert into 会将查询结果保存到已经存在的表中