Access distinct 去重的sql 语句

 sql="select distinct(wt_BatchNumber) ,wt_addUser,wt_addtime from wd_no where "&sqlstr1&" order by  wt_addtime desc    "


上面这个去重的语句整了1天才有结果。

More...

去除数据库中重复的数据(sql语句)

SQL语句如下:

DELETE FROM T_S_POS_SHOPRECODE A
    WHERE (A.POSID, A.SHOPTIME, A.CARDID) IN
    (
     SELECT POSID, SHOPTIME, CARDID
     FROM T_S_POS_SHOPRECODE

More...