SECOND is not an independent statement but a reserved word that identifies the seconds component of a temporal value. SQL engines use it in three primary contexts:1. Interval literals – SECOND declares the unit in an INTERVAL literal such as INTERVAL '30' SECOND. The engine stores the literal as a duration of 30 seconds.2. Date arithmetic – Functions like DATEADD/DATE_SUB (SQL Server, MySQL) or the + operator with INTERVAL in PostgreSQL use SECOND to add or subtract seconds from DATE, TIME, or TIMESTAMP columns.3. Date-part extraction – EXTRACT(SECOND FROM timestamp_expr) or DATEPART(second, timestamp_expr) pulls the seconds field (0-59, including fractional seconds if the data type supports them) from a temporal expression.Because SECOND is a standard date-time unit, the keyword appears across most major SQL dialects, although the exact syntax varies. Fractional seconds are supported when the underlying TIMESTAMP/TIME column stores them; otherwise results are integers. Attempting to use SECOND outside a temporal context or omitting required quotes around the numeric literal will raise a syntax error.
n
(INTEGER or DECIMAL) - Number of seconds to add, subtract, or specify in an interval literal.INTERVAL, EXTRACT, DATEADD, DATEPART, TIMESTAMP, DATE_TRUNC
SQL-92 (temporal INTERVAL feature)
Use the + operator with an INTERVAL literal:SELECT now() + INTERVAL '15' SECOND;
It returns decimals when the source column stores fractional seconds. Otherwise it returns an integer 0-59.
Use DATEADD: SELECT DATEADD(SECOND, 10, GETDATE());
The SQL standard requires the numeric part of an INTERVAL literal to be inside a quoted string. Some dialects (e.g., PostgreSQL) enforce this strictly.