读书人

查寻表里面重复的数据

发布时间: 2012-11-03 10:57:43 作者: rapoo

查找表里面重复的数据

第一种办法:

?

???????????????? 运用存储过程,不过那样比较麻烦。

第二种方法:

??????????????? 用sql语句:

?

???????????????????? select t.account_number,t.insurance_date
???????????????????????????????????????????????????????????????????????????? from i_net_value t
???????????????????????????????????????? where t.rowid !=

?????????????????????? (select max(t.rowid)
??????????????????? ????????????? ?from i_net_value b
??????????????????????????????????? ?where b.account_number = t.account_number and
?????????????????????????????????????????????????? ?b.insurance_date = t.insurance_date)

?

?

读书人网 >软件架构设计

热点推荐