Scroll to top

How to get all unique years from a date column using Sql(Mysql)?


Notice: Undefined variable: string in /home/u665484253/domains/wpcodekit.com/public_html/wp-content/themes/twentytwenty-child/functions.php on line 61

Get all unique years from a date column using Sql(Mysql).

SELECT distinct year(OrderDate) FROM Orders;

SELECT distinct year(column_name) FROM table_name;

Get more information

Read More Posts

Leave a Reply

Your email address will not be published.