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

  • SEARCH
  • Home
  • 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 8429809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:26:22+00:00 2026-06-10T05:26:22+00:00

I have a query having BETWEEN operator but it showing wrong results My query-

  • 0

I have a query having BETWEEN operator but it showing wrong results

My query-

SELECT * FROM register WHERE height BETWEEN  '1' AND  '6'

It also shows the user with height 10, 12 and 16 which is wrong. What is the problem with this query?
I have another query which work fine but is not proper way of using as it make query lengthy

SELECT * FROM register WHERE height > 1 AND height < 12  

Give me idea for right way of getting the query as if more condition is added it would be hard for the query to understand and code.

  • 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-10T05:26:24+00:00Added an answer on June 10, 2026 at 5:26 am

    Assuming height is an integer should it not be

    SELECT * FROM register WHERE height BETWEEN 1 AND 6
    

    You don’t need the single quotes

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

Sidebar

Related Questions

Hi guys I am having issue I have this query: SELECT * FROM useraccount
I have written a SQL query that works just fine, but am having a
I have a query that goes like this: SELECT Product.local_price*Rate.exchange_rate AS 'US_price' FROM Product
I have a query as follows: WITH CTE AS ( SELECT MIN(att.Date) [minDate] FROM
I'm having trouble with this query. I have 2 date coming from textboxes (don't
I have the following query: select C.PROJECTID, C.VERSIONID, C.MODIFIEDATTRIBUTEID, C.MODIFIEDDATE, V.NAME from TPM_PROJECTCHANGES C
I have a query that selects rows in a ListView without having a limit.
I am having trouble writing a query. I have been working with UNION on
I'm having a misunderstanding problem with this use of Linq Query I do have
I'm having an issue getting a LINQ query to work. I have this XML:

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.