insert into tablename(col_a,col_b) select xx,yy from 表;

解决方案 »

  1.   

    pengdali(大力 V3.0) :
    假如 xx 、yy 分别来自不同的select 语句呢?
      

  2.   

    insert into test1(cola,colb)
    select test2.xx,test3.yy from test2,test3;
      

  3.   

    不知道这样可不可以啊?insert into tablename(col_a,col_b) values(select xx from 表 where 条件,select yy from 表 where 条件);
      

  4.   

    insert into tablename(col_a,col_b) select xx,yy from table;