select * into product from product_old  where product.productID<>product_old.productID
试试

解决方案 »

  1.   

    不能这么写.
    如果你要将一个表的数据插入另一个表的话,
    insert into a (select * from b)
      

  2.   

    TO iamshuke() 
     表有唯一值,会产生错误。TO  jiezhi(西域浪子)
    两表有重复的数据,PRODUCTID是主键,按你的方法有错:OR 位于第 1 行:
    -00001: unique constraint (ORCL.PRODUCT_UK01031931248510) violated
      

  3.   

    insert into a (select * from b  where b.productID not in (select productID from a));
      

  4.   

    insert into a Select * from b where a.productID<>b.productID
      

  5.   

    select * from product 
    union
    select * from product_old b where not exists(select 1 from product where productID=b.productID)
      

  6.   

    to beckhambobo(beckham) 
      我要INSERT INTO,你的语句倒是查出了很多东西。
      

  7.   

    在oracle sql中是没有SELECT INTO(只有在PL/SQL里,它表示将select的值赋予一个变量),他和sybase不一样,在sybase中,select * into a from b(其中a不能在数据库中存在),表示先创建一个和b表结构相同的a表,然后将b表的所有内容,导入到a表中。
    你的那个语句在oracle中,可以用create table table_name as select * from roduct a,product_old b where a.productID<>b.productID
      

  8.   

    1. select * from huatest;
    SELECT            UPDATE            INTO               WHERE
    a          b          c          d         
    a2         b          c          d         
    a3         c          c          c         2. insert into huatest 
        select concat(rtrim("SELECT"),'b'),"UPDATE","INTO","WHERE" from huatest;3. 
    SELECT            UPDATE            INTO               WHERE
    a          b          c          d         
    a2         b          c          d         
    a3         c          c          c         
    ab         b          c          d         
    a2b        b          c          d         
    a3b        c          c          c         
      

  9.   

    insert into product 
    select * from product_old b where not exists(select 1 from product where productID=b.productID)