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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:25:32+00:00 2026-05-30T11:25:32+00:00

I have a mySQL with a few database instances. Each database is identical with

  • 0

I have a mySQL with a few database instances. Each database is identical with the same table structure but different data stored.

For example:
Database db1 has a table db1.client and columns db1.client.Id, db1.client.Name, db1.client.Address

Database db2 has a table db2.client and columns db2.client.Id, db2.client.Name, db2.client.Address

Database db3 has a table db3.client and columns db3.client.Id, db3.client.Name, db3.client.Address

I would like to query and list every single database and display the name and address for each respective client table.

How do I do this?

  • 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-30T11:25:33+00:00Added an answer on May 30, 2026 at 11:25 am

    Are they all in different databases, or different tables within the one database?

    If the latter, you can use UNION to string your queries together, e.g.

    SELECT Id, Name, Address
    FROM table1
    UNION
    SELECT Id, Name, Address
    FROM table2
    

    If the former (each table is in a different database) you will have to modify with database names as such:

    SELECT Id, Name, Address
    FROM db1.table
    UNION
    SELECT Id, Name, Address
    FROM db2.table
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have mysql database structure like below: CREATE TABLE test ( id int(11) NOT
I have a few classes, such as those that outline database table structure or
I have a legacy mysql database and there's this table which has a few
I have a mysql table with over 4 million of data; well the problem
I have a MySQL database that has a few very simple tables. I would
I have a mysql database table that will store locations for buildings and events
every Monday I need to empty few fields of a MYSQL database I have
I currently use enums as TINYINTs in MySQL database. My tables have a few
I have a MySQL 5.0 database with a few tables containing over 50M rows.
I have a MySQL database and would like to have a similar structure in

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.