Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 the purpose of using pl/sql?

1144


How do you get column names only for a table (sql server)?

1163


What is the difference between sql and t sql?

1034


Which sql most popular?

988


Why query optimization is needed?

926


What are the different types of triggers?

1136


what are the advantages a stored procedure? : Sql dba

976


Can you select everything, but 1 or 2 fields, without writer's cramp?

984


What is synchronized subquery?

1168


what is denormalization. : Sql dba

1111


What is difference between table and view?

1056


What is range partitioning?

964


How do I view an execution plan in sql?

983


What are inbuilt functions in sql?

1064


How do I run a sql script?

1146