select id,kssj,state from meetinginfo where state=0 and kssj<getdate()

解决方案 »

  1.   

    select id,kssj,state from meetinginfo where state=1列出的>1的记录  这一句没看明白?
      

  2.   

    ID int
    RoomID int
    kssj Datatime
    state bit
      

  3.   

    ID  RoomID  kssj         state
    1   1       2004-09-01     1
    2   1       2004-09-01     1
    3   1       2004-09-01     1
    4   1       2004-09-01     0
      

  4.   

    update meetinginfo set state=0
    where getdate()>kssj and state<>0