Working With MySQL Events – Complete Beginners Guide

By Prem Tiwari in Mysql. Updated on


Hello friends, hope you are doing good. In today’s tutorial, I will explain the very simple and easy steps to working with MySql events with the example. After this tutorial, you will be able to:

1) Create Event
2) View Event
3) Update Event
4) Delete Event

Working With MySQL Events - Complete Beginners Guide

How to create mysql events

There is two type of events to create events in Mysql first is ONE TIME and RECURRING.These examples are tried & tested and it is working fine.

ONE TIME Events

Syntex to create one time events in mysql:

Example:

After executing the above example you will get the success message like “MySQL returned an empty result set (i.e. zero rows). (Query took 0.0002 seconds.)”. Now if you want to see the recently created events in your mysql database, then execute the below commands:

SHOW EVENTS

RECURRING Events

If you want to create the recurring event, then you need to execute the below example:

After executing the above example you will get the success message like “MySQL returned an empty result set (i.e. zero rows). (Query took 0.0002 seconds.)””

Now if you want to see the recently created events in your MySQL database, then execute the below commands:

SHOW EVENTS

How to update the existing events

If you want to edit your existing events, then follow the below example:

How to drop mysql events

Want to drop your existing events from your MySql database, then follow the below example:

Above query will drop the “my_first_event_01″ event from your database. After executing of above example you will see the success message ” MySQL returned an empty result set (i.e. zero rows). (Query took 0.0001 seconds.)”

Sharing is caring!


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

You might also like:

Tags: , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.