• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

doubt on oracle question?

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A family of 4 contains 2 sons who are born the following dates respectively February 1,2000 and April 18,2004
Assumption: Assume the DB is oracle and none of the default DB settings have been altered.
Which of the following queries will give us the exact number of days between the birth dates of the 2 sons?

1) select '01-02-2000'-'18/05/2004' from dual
2)select to_date('01-FEB-2000')-to_date('18-APR-2004') from dual
3)select to_date('01-FEB-2000','DD-MMM-YYYY')-to_date('18-APR-2004','DD-MMM-YYYY') from dual
 
Marshal
Posts: 80954
522
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's obvious. No 4.
What do you think?
Did you read what I said about your previous post?
 
manas ranjan mandal
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if i know the answer then why should i put it in this forum..
 
Campbell Ritchie
Marshal
Posts: 80954
522
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by manas ranjan mandal:
if i know the answer then why should i put it in this forum..

Read these FAQs: ShowSomeEffort and DoYourOwnHomework.
 
Our first order of business must be this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic