隨筆-71  評論-5  文章-0  trackbacks-0

                   select * from  table order by  id   limit    (intPage - 1) * PageRow    , intPage * PageRow




          去重SQL

          select product_code,count(*) as count from h_product_info group by product_code having count>1; 
          select d_date,count(*) as count from h_oddnum group by d_date having count>1 order by d_date desc; 
          delete from h_oddnum where id in (select min(id) from h_oddnum group by d_date having count(d_date) > 1) 
          create table tmp as select min(id) as col1 from blur_article group by title;
          delete from blur_article where id not in (select col1 from tmp); 
          drop table tmp;
          select min(id) from h_oddnum group by d_date having count(d_date) > 1
          create table tmp as select min(id) as col1 from h_oddnum group by d_date having count(d_date) > 1;
          delete from h_oddnum where id not in (select col1 from tmp); 
          drop table tmp;
          insert into h_oddnum(id,d_date,d_code) values('e1d64c5f536b4b1bbfe9f04511c01f3f','20150422172207','00001');
          posted on 2015-05-19 17:12 藤本薔薇 閱讀(178) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 蕲春县| 霞浦县| 轮台县| 花莲市| 邵阳县| 乌苏市| 阿拉尔市| 额尔古纳市| 泾阳县| 玛纳斯县| 宜兰市| 彰化县| 石林| 东方市| 莱州市| 商都县| 共和县| 大理市| 益阳市| 蓬莱市| 罗平县| 邳州市| 邮箱| 信丰县| 双江| 昌图县| 恩施市| 沁源县| 苍山县| 太白县| 偏关县| 包头市| 内乡县| 隆回县| 得荣县| 德令哈市| 黄龙县| 马尔康县| 鹿邑县| 浙江省| 六枝特区|