• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I have a doubt in oracle!

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to get the data from the database such that I would get the data between 2 dates inclusive of the given dates. Using Between function returns only the data between the 2 dates without including the from date.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you've misunderstood the Oracle documentation; you can understand "between" to mean "greater than or equal to the first value, and less than or equal to the second". So:

means that the value of <param> is any value in the set {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}.

An result of this is that the between comparison operator implicitly requires ordering. If I wrote it the other way:

This would only return true if the value of <param> was not in the set {2, 3, 4, 5, 6, 7, 8, 9}.

[ January 17, 2005: Message edited by: Paul Sturrock ]
[ January 17, 2005: Message edited by: Paul Sturrock ]
 
Tick check! Okay, I guess that was just an itch. Oh wait! Just a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic