我想从一个表p
  批号     数量        日期
  1111     11       2003-06-11
得到t
  批号     数量        车间       日期
  1111     11         一车间     2003-06-11
想用一条sql语句
  insert into t select ? from  p 
我不知select 以后怎么写,请高手帮一下,谢谢!!!

解决方案 »

  1.   

    insert into t(批号,数量,日期) seletc 批号,数量,日期 from p
      

  2.   

    sql.text:='insert into t(批号,数量,车间,日期) select 批号,数量,'+#39+'一车间'+#39+'日期 from p
      

  3.   

    sql.text:='insert into t(批号,数量,车间,日期) select 批号,数量,'+#39+'一车间'+#39+',日期 from p'
      

  4.   

    insert into t select 批号,数量,'一车间',日期 from  p
      

  5.   

    insert into t(批号,数量,车间,日期) 
    select  批号, 数量, '一车间', 日期 form p不行找我!