What will be the output of this Query?
select to_char(trunc(add_months(sysdate-3),mm),mm/dd/yyyy) from dual

Answer Posted / nitin

Let SYSDATE = '20-Sep-2012'

Use below query,

select to_char(trunc(add_months(sysdate,-
3),'mm'),'mm/dd/yyyy') from dual;

It will give you ...
o/p :

'06/01/2012'

Is This Answer Correct ?    15 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain polymorphism in pl/sql.

820


Why commit is not used in triggers?

773


How do I sort a table in sql?

765


What is the purpose of primary key?

749


What is procedure in pl sql?

722






What does where 1/2 mean in sql?

759


What is sql mysql pl sql oracle?

784


What is difference sql and mysql?

703


What is dynamic sql in pl sql?

707


What is insert command in sql?

769


Is id a reserved word in sql?

859


What is a sql statement?

692


How do I trace sql profiler?

705


What is a primary key called that is made up of more than one field?

1026


What is benefit of creating memory optimized table?

702