MySQL Forums
Forum List  »  Microsoft SQL Server

Re: convert MSSQL job to MySQL
Posted by: Dmitry Tolpeko
Date: May 03, 2013 02:19AM

Hi Craig,

Look at the CREATE EVENT statement to schedule a job in MySQL.

DELIMITER //

CREATE EVENT log_trunc ON SCHEDULE EVERY 1 DAY
DO
BEGIN
   DELETE FROM ESSyslogMain WHERE recorddate < curdate()- 30;
   -- ... other code
END //

DELIMITER ;

Regarding 2nd and 3rd lines, what storage engine are you using in MySQL?

Dmitry


--
http://www.sqlines.com - Database migration and validation tools for MySQL, SQL Server and Oracle

Options: ReplyQuote


Subject
Written By
Posted
Re: convert MSSQL job to MySQL
May 03, 2013 02:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.