where is 表1?
where is 表2?

解决方案 »

  1.   

    select sum(休息时间) from table2 where [id]>(select id from table2 where stime <='8:45' and etime>='8:45') and [id] <=(select id from table2 where stime <='9:30' and etime>='9:30')自己搞定了能不能加分?
      

  2.   

    insert into tablename
    select ....from 
    ...
      

  3.   

    select   sum(休息时间)   from   table1   where   [id]> (select   id   from   table1   where   stime   <='8:45'   and   etime> ='8:45')   and   [id]   <=(select   id   from   table1   where   stime   <='9:30'   and   etime> ='9:30') '8:45' '9:30'从表2中取