zoukankan      html  css  js  c++  java
  • SQL2008-删除时间字段重复的方法

    ID  EMAgitation_ID    YieldDateTime

    1   2                              2012-02-11 10:18:54.000
    2   2                              2012-02-11 10:18:54.000
    3   2                              2012-02-11 11:28:12.000
    4   2                              2012-02-11 11:28:12.000

     

    Delete From StuffAgitationYield Where ID in (select MIN(ID) From StuffAgitationYield Group By YieldDateTime,EMAgitation_ID  Having Count(YieldDateTime)>1 and YieldDateTime>='2012-02-01 00:00:00.000' and YieldDateTime<='2012-02-29 00:00:00.000')

     

    ID  EMAgitation_ID    YieldDateTime

    2   2                              2012-02-11 10:18:54.000
    4   2                              2012-02-11 11:28:12.000

  • 相关阅读:
    aspscheduler+uwsgi定时任务执行多次
    django定时任务
    django记录用户操作模块
    python缩小图片
    pymysql同时执行多条语句时报错
    MySQL8.0 修改密码
    linux中安装python3
    Mysql高性能
    Mysql高性能
    Mysql高性能
  • 原文地址:https://www.cnblogs.com/FKdelphi/p/4640587.html
Copyright © 2011-2022 走看看