MINUTE is a temporal keyword that refers to the minute field of a time, timestamp, or interval value. It appears in three common contexts:1. Extraction – Used with EXTRACT (Standard SQL, PostgreSQL, BigQuery), DATEPART (SQL Server), or the MySQL/SQLite MINUTE() function to pull the minute (0-59) from a date-time expression.2. Interval specification – Combined with the INTERVAL literal to build relative time values such as INTERVAL '15' MINUTE or INTERVAL '2-30' HOUR TO MINUTE.3. Date arithmetic helpers – Accepted by functions like DATE_ADD, DATE_SUB, and TIMESTAMPADD as the unit that dictates how many minutes to add or subtract.The returned value is always an integer in the range 0 through 59. If the source expression is NULL, the result is NULL. When used in INTERVAL literals, MINUTE serves as the unit label and does not generate a result on its own.Caveats:- Some dialects (MySQL, SQLite) provide a dedicated MINUTE(expr) scalar function, whereas others require EXTRACT(MINUTE FROM expr).- SQL Server uses DATEPART(minute, expr) and DATEDIFF(minute, start, end).- INTERVAL syntax differs slightly between systems: PostgreSQL accepts INTERVAL '5 minutes', Oracle uses NUMTODSINTERVAL(5, 'MINUTE'), MySQL prefers INTERVAL 5 MINUTE in DATE_ADD.- Fractional minutes are not supported; you must convert to seconds for sub-minute precision.
EXTRACT, DATEPART, HOUR, SECOND, INTERVAL, DATE_ADD
SQL-92
Use EXTRACT(MINUTE FROM timestamp) in Standard SQL or PostgreSQL. In MySQL, call MINUTE(timestamp). SQL Server users can call DATEPART(minute, timestamp).
Most databases accept INTERVAL 'n' MINUTE added to a timestamp (PostgreSQL, Oracle). MySQL offers DATE_ADD(timestamp, INTERVAL n MINUTE), and SQL Server provides DATEADD(minute, n, timestamp).
The function always returns integers from 0 through 59. Null input returns Null.
No. For sub-minute precision, extract SECOND or MILLISECOND instead.