We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,464 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Mysql Query multiple Databases

hello,

I have a situation that i'm wondering if there's a solution. I have specific databases for different cities in texas. I plan on adding more but i do not nkow how many more or what their names will be. Every city is going to have the same tables in them. I want to UNION all the similar tables in every database. Is it possible to query every database.specifictable without knowing the names of all of the databases yet.

Thanks in advance

2
Contributors
1
Reply
1 Hour
Discussion Span
1 Year Ago
Last Updated
2
Views
RazorRamon
Junior Poster in Training
78 posts since Sep 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

You can build your query, based on the output of the SHOW DATABASES query. Note that this can get real slow.

pritaeas
Posting Prodigy
Moderator
9,533 posts since Jul 2006
Reputation Points: 1,194
Solved Threads: 1,494
Skill Endorsements: 98

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0647 seconds using 2.67MB