how to get the year from a date sql code example
Example 1: get current year sql
select year(getdate())
Example 2: extract year from date sql
SELECT extract(YEAR FROM sysdate) FROM dual; // number
SELECT to_char(sysdate, 'YYYY') FROM dual; // varchar