SQL 語句

去重字段裏的值select

SELECT  DISTINCT cat_id,goods_sn,repay FROM `ecs_goods` where cat_id != 20014去重

 

刪除除去 去重字段 DELETE FROM  `ecs_goods` where goods_id NOT IN ( select bid from (select min(goods_id) as bid from `ecs_goods` group by cat_id,goods_sn,repay) as b );

相關文章
相關標籤/搜索