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

Define implicit and explicit cursors.

625


Is progress software supports to ( pl/sql )?

526


How can we store rows in PL/SQL using array?

662


what is the bond code in materialized view?

2489


What are the different ddl commands in sql?

576






List the ways to get the count of records in a table?

503


Is sql a backend language?

618


how many groups of data types? : Sql dba

564


Mention what is the function that is used to transfer a pl/sql table log to a database table?

484


What is pessimistic concurrency control? : Transact sql

584


Is it possible to sort a column using a column alias?

601


How do I partition in sql?

536


Differentiate pl/sql and sql?

559


What is mutating trigger?

576


How many sql databases can you have on one server?

590