Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete last row of table...

Status
Not open for further replies.

stlrain95

Programmer
Sep 21, 2001
224
US
Need to delete the last row of a table.

I know i need to use recno(), but in what capacity?
 
You can use the renco(), only if you know what it is. If you need to delete the "last entered" record, try this:
Code:
SELECT myTable
SET ORDER TO && Puts it in the order it was entered
GO BOTTOM
DELETE

 
Just for clarification, RECNO() is the current record number. RECCOUNT() is the total number of records. Keep in mind, deleting a record does not physically remove it from the table either, it just flags the record as 'deleted'.

Dave S.
 
Understand, just needed to get the last one out. I "PACKED" afterwards so I could get that out.

Thank you again for all the help.
 
...and to clarify further RECCOUNT() includes those records marked for deletion regardless of the state of SET DELETED "I love work. I could sit and stare at it for hours..."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top