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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:11:36+00:00 2026-06-06T13:11:36+00:00

I know I can combine tables with sql queries, but that’s not what I

  • 0

I know I can combine tables with sql queries, but that’s not what I am looking for.

Imagine having 10 tables, all are identical, but for certain reasons, I do not want to mix this data together in 1 table. Though! On the other hand, to create certain search results i want to be able to do a single sql query: (select * from combined_table where name=’whatever’)

In which I get data on the fly from all those 10 tables…

possible, yes/no?

  • 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-06T13:11:37+00:00Added an answer on June 6, 2026 at 1:11 pm

    You almost certainly want to put this data into a single table.

    Let’s say you have ten different types of data. Add a column called type (you should choose a better name) and allow it to have a value from 1 to 10. Now your query will work without changes.

    You can still get the data separately if you wish:

    SELECT * from yourtable
    WHERE name = 'whatever'
    AND `type` = 3
    

    The only reason I can think of for not doing it is if you have different users with different permissions and you want to use tables to control which users can see which data.


    If despite the benefits, you still don’t want to put the data in one table you can solve your issue by using UNION ALL.

    CREATE VIEW yourview AS
    SELECT col1, col2, ..., coln FROM table1
    UNION ALL
    SELECT col1, col2, ..., coln FROM table2
    UNION ALL
    SELECT col1, col2, ..., coln FROM table3
    UNION ALL
    etc...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a query that I know can be done using a subselect, but
I know you can combine multiple table-selects using a Join statement but is there
I don't understand how to combine two tables so that I can generate an
I'm having some trouble with finalizing my MySQL query. Imagine that i combine the
You can know if the event stack is empty calling the gtk.events_pending() method, but
I know I can purchase it for $299.00, but my primary reason for upgrading
I know I can get touch events in my iPhone app. But these touch
Hey how can I combine the two queries below into one?? so I get
I have a large vb6/sql database app (hundreds of tables, classes, and forms) that
I know this type of question has been asked before, but I could not

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.