Mysql Blog Posts

Creating Trigger in MySql

MySQL trigger syntax :
In order to create a new trigger, you use the CREATE TRIGGER statement.
Syntax of the CREATE TRIGGER statement:
CREATE TRIGGER trigger_name trigger_time trigger_event
ON table_name
FOR EACH ROW
BEGIN

0 Likes 1094 Views
MySQL | LAST_DAY() Function

LAST_DAY() Function:
The LAST_DAY() function in MySQL can be used to know the last day of the month for a given date or a datetime. The LAST_DAY() function takes a date value as argument and returns the last day of month in that date. The date argument represents a valid date or datetime.
Syntax:
LAST_DAY(Date);
If the date or datetime value is invalid, the function returns NULL.
Parameters Used:
Date: The LAST_DAY() function takes a single argument Date. It is the date or datetime value for which you want to extract the last day of the month.

0 Likes 1185 Views