隨筆-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 藤本薔薇 閱讀(180) 評論(0)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 保康县| 蓝山县| 昌都县| 临西县| 鲁甸县| 汝城县| 鲁山县| 平顺县| 盈江县| 比如县| 安国市| 高雄市| 万荣县| 敖汉旗| 永城市| 江都市| 甘洛县| 托里县| 吴桥县| 工布江达县| 塘沽区| 株洲县| 阿坝| 绥德县| 成都市| 天峨县| 大悟县| 扎兰屯市| 玉树县| 南宁市| 永善县| 内黄县| 通江县| 伊金霍洛旗| 双辽市| 孝感市| 疏勒县| 海林市| 多伦县| 治多县| 财经|