sql extract year and month from date code example
Example: extract year from date sql
SELECT extract(YEAR FROM sysdate) FROM dual; // number
SELECT to_char(sysdate, 'YYYY') FROM dual; // varchar
SELECT extract(YEAR FROM sysdate) FROM dual; // number
SELECT to_char(sysdate, 'YYYY') FROM dual; // varchar