insert into tudentgrid select s_xh,max(q_no),max(q_type),max(q_credit)
from 
s_temptable
group by s_xh

解决方案 »

  1.   

    好像是不行的哟,我现在只需把学号放进dbgrid就行了别的字段还暂时不用考虑:)
      

  2.   

    insert into tudentgrid(s_xh) slelect distinct s_xh from s_temptable
      

  3.   

    也可以这样,insert into tudentgrid(s_xh) slelect  s_xh from s_temptable group by x_xh
      

  4.   

    select * from s_temptable union select * from s_temptable into your_table_name
    试一下看符合你的要求吗?