SECOND

Returns the second part of the datetime.

Syntax

SECOND(datetime)

Example

SELECT SECOND("2020-06-20 10:02:18");

The above query returns 18.