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

MySQL & triggers

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I want to run each night (automatic) an sql statement to delete old entries. Is such a thing possible with MySQL ?
 
It's possible, but a script like that is something you have to do outside of MySQL. Unix systems have "cron", and Windows 2000 has a scheduler. So, you can write a small shell script which runs the query, and call it from the scheduler.

To clarify a couple of things, MySQL does not have triggers, at least not yet. But anyway, triggers are an event-driven mechanism, meaning they are a response to a certain query meeting certain conditions. Triggers are not meant to be a scheduling mechanism. At least, I have never heard of triggers that work that way. -------------------------------------------

"Now, this might cause some discomfort..."
(
 
it is something like a job event I meant a trigger wasn't the right word
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top