隨筆-71  評論-5  文章-0  trackbacks-0
          語句對的,但不能執行
          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 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;
          posted on 2015-04-22 16:50 藤本薔薇 閱讀(140) 評論(0)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 永嘉县| 沿河| 临海市| 娱乐| 文化| 永平县| 大悟县| 彭阳县| 柞水县| 苏尼特右旗| 遂溪县| 天峨县| 米脂县| 行唐县| 永年县| 南宫市| 富平县| 天峻县| 榆中县| 宜章县| 民权县| 宁陵县| 朝阳市| 麦盖提县| 原平市| 靖边县| 太仓市| 陇西县| 大城县| 晋州市| 泗水县| 威远县| 沽源县| 上蔡县| 巩留县| 桐庐县| 鹰潭市| 新化县| 南川市| 合川市| 米泉市|