Curriculum
Course: MYSQL
Login

Curriculum

MYSQL

MySQL References

0/140
Text lesson

SECOND

Example

Retrieve the seconds component from a datetime value.

SELECT SECOND(“2017-06-20 09:34:00.000023”);

Definition and Usage

The SECOND() function retrieves the seconds component of a time or datetime value, ranging from 0 to 59.

Syntax

SECOND(datetime)

Parameter Values

Parameter

Description

datetime

Mandatory: The time or datetime value from which to extract the seconds.

Technical Details

Works in:

 From MySQL version 4.0

More Examples

Example

Retrieve the seconds component from a specified time value.

SELECT SECOND(“23:59:59”);