the 'oldest' (can't think of better words to use right now) data in the database.
ORDER BY datefield, basically.
yup, i've thinked of that but I just want to delete the data which is the oldest in the database. can i just do it by one SQL statement?
pick a cut off date<BR><BR>then<BR><BR>DELETE tableName WHERE someDateField < 'cut off date here'
i just want to keep only 5 most recent data added to the websites into the database. So when it reach 5 records it will pick the oldest data and delete it and then it will add a new data in it.
all right, whetever<BR><BR>DELETE tableWhatever WHERE id_field IN (SELECT TOP 5 id_field FROM tableWhatever ORDER BY sequentialField)<BR><BR><BR>j<BR>http://rtfm.atrax.co.uk/