select chehao,sum(jing) as jing into sy1 from jcc where rq1='2003-04-11' group by chehao

解决方案 »

  1.   

    select * into newtable from oldtable where 1=2 -- 只生成表结构
      

  2.   

    select chehao,sum(jing) as tempfield into sy1 from jcc where rq1='2003-04-11' group by chehao
      

  3.   

    由于sum(jing) 后不知道这个列名是什么,所以生成新表的时候这个列就没有名字
    这显然是不行的
    所以你只要为他指定一个别名就可以了