删除数据库中出现得重复数据得sql语句!

 

 delete from table1   from   table1   a   where   exists(select   *   from   table1   where   a.YX_ID<YX_ID   and   a.zdvalue4=zdvalue4)  


SELECT   top(11)  *  FROM         c86_addis  AS  a  WHERE not exists (SELECT   *  FROM          c86_addis  WHERE     a.addis_id < addis_id AND   a.phone = phone and   addis_pro=5 and firstmsg_id=8 )  and   addis_pro=5 and firstmsg_id=8 
这句是查询出不重复得语句

posted on 2008-05-14 10:15  恋地高飞  阅读(247)  评论(0编辑  收藏  举报

导航