SQL去掉重复数据

1 SELECT vc_your_email,vc_our_ref_or_code
2       INTO #tmp
3       FROM( SELECT vc_your_email,vc_our_ref_or_code,ROW_NUMBER() OVER (PARTITION BY vc_your_email ORDER BY newid()) NUM FROM #ip_single_email_total
4       ) P WHERE NUM=1

 

posted @ 2017-10-09 13:35  潮崖客  阅读(237)  评论(0编辑  收藏  举报