Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

I want to get only year using sysdate with my defined column name. but not able to get it.

Mahesh TyagiOct 8 2015 — edited Oct 8 2015

I want to get only year using sysdate with my defined column name. but not able to get it.

SQL> select to_char(sysdate, 'yyyy') as "mahesh tyagi" from dual;

mahe

----

2015

SQL> select to_char(sysdate,'yy') as "mahesh" from dual;

ma

--

15

So i not able to get 'mahesh' or 'mahesh tyagi' as the column name.

This post has been answered by AndrewSayer on Oct 8 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 5 2015
Added on Oct 8 2015
5 comments
409 views