Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8319079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:12:14+00:00 2026-06-08T22:12:14+00:00

Easy question… Is there any way to do a where clause comparing a number

  • 0

Easy question… Is there any way to do a where clause comparing a number to two numbers in one statement? Something like this:

where 1000 > 500 > 300

The reason is, if I need to evaluate the 500 and it’s expensive this would save a lot of time over the alternative:

where 1000 > 500
  and 500 > 300
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T22:12:17+00:00Added an answer on June 8, 2026 at 10:12 pm

    You can write

    where 500 between 301 and 999
    

    or

    select a,b,c from (
       select a,b,c, 500 as d from ....
    ) where 1000 > d and d > 300
    

    but there is also hope that the database is clever enough to figure out that it has to do the calculation only once.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Pretty easy question, but anyway: is there any reason to override default constructor like
Sounds like an easy question, I know. I am literally stumped. Here are two
Easy question: I'm trying to add a number to an array like this: sorted[4][2]+=nbrMvt[i];
Easy question hopefully. . . Is there any benefit to be gained by turning
An easy question often puzzled me: There are two IP(v4) addresses,192.168.0.1/30 and 192.168.0.2/24, I
i bet its pretty easy question , any way im trying to run a
This may be an easy question and perhaps I am missing something here. The
This is probably an easy question for anyone with any moderate expertise with web
Easy question for you vets out there: What is the accepted (assuming there is
An easy question for you guys. I assume there must be an easier (=

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.