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

Answer Posted / rajeev

select to_char(trunc(add_months(sysdate-3),mm),mm/dd/yyyy) from dual--This query will return error...
we can use below query..
select to_char(trunc(add_months(sysdate-1,3),'mm'),'mm/dd/yyyy') from dual;
output:05/01/2018

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is 'mysqldump'? : Sql dba

760


How do we use distinct statement? What is its use?

750


Why we use pl sql?

706


What is the execution plan in sql?

758


What is nosql example?

779






What are the built in functions of sql?

757


How many disk partitions should I have?

719


How to connect a sql*plus session to an oracle server?

819


What is join view in sql?

698


How many types of index are there?

724


What is the maximum number of triggers, you can apply on a single table?

733


What is mutating error in pl sql?

750


What are the constraints available in sql?

781


What is not in sql?

667


What is normalization sql?

719