消除sql2000里的重复数据
发布时间:2021-01-13 06:10:30 所属栏目:MySql教程 来源:网络整理
导读:今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 declare @id1 int,@oldid int,@e_REcordid int,@Olde_REcordid intDECLARE price CURSORFOR SELECT id,E_recordId FROM evaeve order by E_recordId d
以下代码由PHP站长网 52php.cn收集自互联网 现在PHP站长网小编把它分享给大家,仅供参考 declare @id1 int,@oldid int,@e_REcordid int,@Olde_REcordid int DECLARE price CURSOR FOR SELECT id,E_recordId FROM evaeve order by E_recordId desc OPEN price FETCH NEXT FROM price into @oldid,@Olde_REcordid while @@fetch_status = 0 begin FETCH NEXT FROM price into @id1,@e_REcordid if @[email?protected]_REcordid BEGIN delete from evaeve where [email?protected] end set @[email?protected] set @[email?protected]_REcordid end close price DEALLOCATE price delete from evaeve where id not in( select max(id) from evaeve group by E_RecordID) 以上内容由PHP站长网【52php.cn】收集整理供大家参考研究 如果以上内容对您有帮助,欢迎收藏、点赞、推荐、分享。 (编辑:ASP站长) 【免责声明】本站内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。 |
相关内容
未处理完善
-
无相关信息
最新更新