现在大家的水平都提高了,有了达到目的的代码还不算,有些还要求用一条语句来实现。

活到老,学到老!http://www.(该域名已经被ISP盗卖了)E-mail:hu-jj@


程序代码:Create Cursor T (Kh C(3))
Insert Into T Values ("001")
Insert Into T Values ("001")
Insert Into T Values ("002")
Insert Into T Values ("003")
Insert Into T Values ("001")
Insert Into T Values ("003")
Insert Into T Values ("002")
Insert Into T Values ("001")
Insert Into T Values ("002")
Insert Into T Values ("001")
Index on kh+Str(Recno(),Len(Transform(Reccount()))) Tag kh
Go Top
Do While Not Eof()
lckh=kh
Skip
If kh=lckh
Skip -1
Delete Record Recno()
Skip
Endif
Enddo
Set Order To
Browse