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 6829523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:30:36+00:00 2026-05-26T22:30:36+00:00

I have two tables in a MySQL database. In the first column of data

  • 0

I have two tables in a MySQL database. In the first column of data in table A (A1) I have integer values. In the first and second columns of table B (B1 and B2) I also have integer values. I would like to create a query which would give me the values where A1 is within the range B1 – B2. Is this possible to do with a MySQL query?

Here is an example of what I would like to know how to do:

Table A        Table B    
-------        -------    --------
123            12         24
451            450        455
199            202        210
0              499        567
23             5          40

The SQL query I am looking for would return the matching A1, B1, and B2 values:

451    450     455
23     12      24
23     5       40
  • 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-05-26T22:30:37+00:00Added an answer on May 26, 2026 at 10:30 pm
    select * from a, b where a1 between b1 and b2
    

    is as simple as cross joins get. It’s the equivalent of an inner join in MySQL and Oracle at least.

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

Sidebar

Related Questions

I have two MySQL database tables that are meant to hold data for eshop
I have two tables in my MySQL database (table1 and table 2). I want
I have 10 tables in my database(MySQL). two of them is given below tbl_state
using php and mysql I have two tables, a users table and a profiles
I have two different tables, lead and click. I would like to query MySQL
I have two tables in my SQL Server database. The first is Test1 and
I have two MySQL database tables: one containing a list of championships and another
Consider these two tables stored in a MySQL database. The first stores a list
I am trying to import data from a large database. I have two tables
I have a mysql database that has 2 table. the first table contains the

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.