惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
D
Docker
Vercel News
Vercel News
IT之家
IT之家
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
腾讯CDC
Google DeepMind News
Google DeepMind News
I
InfoQ
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
The GitHub Blog
The GitHub Blog
博客园 - Franky
The Cloudflare Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
T
Tenable Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
Security Latest
Security Latest
H
Hackread – Cybersecurity News, Data Breaches, AI and More
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 聂微东
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Simon Willison's Weblog
Simon Willison's Weblog
The Last Watchdog
The Last Watchdog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
U
Unit 42
The Hacker News
The Hacker News
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
F
Full Disclosure
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
Project Zero
Project Zero

博客园 - 碧血黄沙-java、c#

nginx反向代理tomcat应用,struts2网站程序redirect时导致请求地址错误的解决方法 开源一个最近写的spring与mongodb结合的demo(spring-mongodb-demo) 基于spring框架的apache shiro简单集成 java的struts2项目实现网站首页只显示域名不显示index.do的做法 用WPF开发仿QQ概念版之--------MessageWindow开发以及Demo下载 用WPF开发仿QQ概念版之--------Loading预加载界面(闪屏窗体) 用WPF开发仿QQ概念版之--------登录界面 纪念一下我在2009年开发的一款网站客户端软件[winform] 参考XNA官方Platformer模版,修改Platformer为横版可以滚动的小游戏 Xna小游戏开发【飞机空间大战】 Airfey Radio网络电台播放器V2.0绿色单文件版本发布(大小仅296KB) 一种开发软件的新思路,给Web页面穿个马甲,用web页面做软件UI,用C#(或者C++等其它语言)代码做功能 Airfey Radio网络电台播放器V2.0版本发布(2010.4.18最新更新) Airfey Radio网络电台播放器V1.0.0.0版本发布(2010.1.29更新)此版本不再更新,转入2.0版本开发 网络电台播放器即将开放下载,敬请期待!!! 在WinForm里面使用多线程修改主线程上的一个Label的值 发布Winform自定义控件snMessageBox,基于系统的MesssageBox实现重绘,需要源码者请留下邮箱 [原创]WinForm中重绘滚动条以及用重绘的滚动条控制ListBox的滚动 高仿QQMusic播放器,浅谈WinForm关于UI的制作
在几千条记录里,存在着些相同的记录,如何能用SQL语句,删除掉重复的呢?
碧血黄沙-java、c# · 2009-08-10 · via 博客园 - 碧血黄沙-java、c#

在几千条记录里,存在着些相同的记录,如何能用SQL语句,删除掉重复的呢?
  1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断  
  select   *   from   people  
  where   peopleId   in   (select     peopleId     from     people     group     by     peopleId     having     count(peopleId)   >   1)  
   
  2、删除表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断,只留有rowid最小的记录  
  delete   from   people    
  where   peopleId     in   (select     peopleId     from   people     group     by     peopleId       having     count(peopleId)   >   1)  
  and   rowid   not   in   (select   min(rowid)   from     people     group   by   peopleId     having   count(peopleId   )>1)  
   
  3、查找表中多余的重复记录(多个字段)    
  select   *   from   vitae   a  
  where   (a.peopleId,a.seq)   in     (select   peopleId,seq   from   vitae   group   by   peopleId,seq     having   count(*)   >   1)  
   
  4、删除表中多余的重复记录(多个字段),只留有rowid最小的记录  
  delete   from   vitae   a  
  where   (a.peopleId,a.seq)   in     (select   peopleId,seq   from   vitae   group   by   peopleId,seq   having   count(*)   >   1)  
  and   rowid   not   in   (select   min(rowid)   from   vitae   group   by   peopleId,seq   having   count(*)>1)  
   
  5、查找表中多余的重复记录(多个字段),不包含rowid最小的记录  
  select   *   from   vitae   a  
  where   (a.peopleId,a.seq)   in     (select   peopleId,seq   from   vitae   group   by   peopleId,seq   having   count(*)   >   1)  
  and   rowid   not   in   (select   min(rowid)   from   vitae   group   by   peopleId,seq   having   count(*)>1)  

新站上线--咱地里 www.zandili.com 科技博客