隨筆-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)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 永顺县| 密山市| 民丰县| 锦州市| 黔南| 赣州市| 临武县| 砚山县| 两当县| 合作市| 景东| 承德市| 育儿| 德格县| 昆明市| 九台市| 白沙| 油尖旺区| 新源县| 邵阳市| 阿拉善左旗| 双鸭山市| 沙河市| 永修县| 抚宁县| 荥阳市| 务川| 阳信县| 玉树县| 同江市| 铜梁县| 台南市| 温州市| 宾阳县| 乌鲁木齐市| 松江区| 高淳县| 穆棱市| 呼伦贝尔市| 铁力市| 五河县|