Subscribe Now!

Enter your email address:

Sunday, September 13, 2015

How to Select Year Only From Date in SQL

Select Only Year From Date in Oracle Sql

If you want to select only Year in the date below query is the solution for you:


select to_char(REQ_DATE, 'YYYY') as Ye from tbl_pr_data where to_char(REQ_DATE, 'YYYY')='2015';

Note:

REQ_DATE is Coulumn Name
tbl_pr_data is Table Name

In the above select query just i have select the year of 2015 from the table using where Condition.





How to Select Year Only From Date in SQL

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...