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