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 / 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

What is union and union all keyword in sql?

1112


What is a record in a database?

1102


Why function is used in sql?

992


What is basic structure of pl sql?

1132


what are the nonstandard string types? : Sql dba

1208


When is a declare statement required?

1197


How are sql commands classified?

1143


Can we call a function containing dml statements in a select query?

1025


Is left join same as join?

1039


What is difference between joins and union?

1196


What does where 1 1 mean in sql?

1079


What is secondary key?

989


what are the different tables present in mysql? : Sql dba

1046


What is sql table?

1022


What is an exception in pl/sql?

1169