Syntax
YEAR(date)
Purpose
Returns the year part of the date value.
Examples
obclient> SELECT YEAR('1987-01-01');
+--------------------+
| YEAR('1987-01-01') |
+--------------------+
| 1987 |
+--------------------+
1 row in set
OceanBase Database
Download PDF
YEAR(date)
Returns the year part of the date value.
obclient> SELECT YEAR('1987-01-01');
+--------------------+
| YEAR('1987-01-01') |
+--------------------+
| 1987 |
+--------------------+
1 row in set