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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete first record in a table 1

Status
Not open for further replies.

gal4y

Technical User
Dec 24, 2001
72
US
I would like to know the SQL to delete the first record in a table/query.

I need only keep 10 records (calculation data) in a table. When it gets to 11 records I would like to delete the first record.

What is the SQL to do that. The table is called tblzeroize with an ID field and time field.

Thanks for any assistance in advance.
Greg
 
Try
Code:
   Delete * From tbl Where tbl.TimeField = MIN(tbl.TimeField)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top