您的位置:首页 > 其它

虚拟化--038 vsphere ESXI升级方法

2015-08-20 16:59 218 查看
面试的时候经常会有删除数据库重复记录的sql

// 数据库有主键id,查找col相同的记录

delete from table t where t.id not in (select min(tb.id) from table tb where tb.col=t.col)

// 数据库中没有主键id,查找col 相同的记录

delete from table t where t.rowid not in (select min(tb.rowid) from table tb where tb.col=t.col)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: