• Post Reply Bookmark Topic Watch Topic
  • New Topic

Delete Expired Rows?

 
Drew Lane
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm looking to delete rows in my relational
database (mysql) upon a certain expiration date
(say, 30 days after the original data was entered)
Any ideas on the best way to do this?
Do databases typically have this feature built in
or is it something you have to program?
Thank you,
Drew
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This will depend on the DB. You can write a stored procedure that will have to be executed to delete rows that meet your criteria.
 
sharad goswami
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
program it...
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!