MINUTE_SECOND is one of MySQL’s supported INTERVAL unit keywords. It expresses a duration made up of minutes and seconds and can be used with DATE_ADD, DATE_SUB, TIMESTAMPADD, TIMESTAMPDIFF, and in standalone INTERVAL literals.1. Literal form - Write the value as a quoted string in the format 'MM:SS' (for example '7:30' or '12:05'). - The left part is interpreted as minutes, the right part (00-59) as seconds.2. Behavior in DATE_ADD / DATE_SUB / TIMESTAMPADD - The specified minutes and seconds are added to or subtracted from the input datetime or time value. - Precision stops at whole seconds. Fractional seconds are not accepted with MINUTE_SECOND.3. Behavior in TIMESTAMPDIFF - Returns a BIGINT whose value is minutes*100 + seconds. - Example: 2 minutes 15 seconds becomes 215.4. Caveats - Only supported in MySQL and MariaDB. Other databases require different interval syntax. - Incorrect string format (missing colon or seconds outside 0-59) raises an error or returns NULL depending on SQL mode. - Leading zeros are optional for minutes but required for seconds. - For sub-second precision use SECOND_MICROSECOND instead.
INTERVAL, DATE_ADD, DATE_SUB, TIMESTAMPDIFF, TIMESTAMPADD, MINUTE_MICROSECOND, SECOND_MICROSECOND
MySQL 4.1
Use a quoted string in the form 'MM:SS', for example '7:30'. The part before the colon is minutes, the part after is seconds (00-59).
No. PostgreSQL, SQL Server, Oracle, SQLite and most others do not recognize this keyword. They require their own interval syntax.
TIMESTAMPDIFF(MINUTE_SECOND, t1, t2) returns an integer minutes*100 + seconds. The value 215 represents 2 minutes and 15 seconds, not 215 seconds.
MINUTE_SECOND cannot store fractions of a second. Use SECOND_MICROSECOND or perform math on TIME_TO_SEC values if you need millisecond accuracy.