Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have plan to create 3000 tables for my database. But I am afraid how will I retrieve some data from those many tables.


Select * 
from table1, table2, table3.... table3000 
where colmn='somevalue';

I can't type the names of all tables in the FROM clause.

Is it possible to work with those many tables in SQL ? If not which DB will be the best to work with those many tables ?

Please help. Thanks in advance.

share|improve this question

closed as unclear what you're asking by Jon Seigel, Mark Storey-Smith, RolandoMySQLDBA, bluefeet, StanleyJohns Sep 13 '13 at 0:45

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

Why, why, why are you creating 3000 tables that seem to model the same data? – Aaron Bertrand Sep 12 '13 at 20:30
I agree with Aaron. Why would you want to do that? It sounds as if your data model is completely wrong. – a_horse_with_no_name Sep 12 '13 at 20:39
Are you trying to do some form of partitioning, but are not aware of it? But still, 3000 is too much. – StanleyJohns Sep 13 '13 at 0:45

Is it possible to work with those many tables in SQL?

Yes, it is:

The number of tables allowed in a SELECT query is limited only by available resources.

share|improve this answer
The question is tagged oracle, not sql-server – a_horse_with_no_name Sep 12 '13 at 20:36
@a_horse_with_no_name But the question also asks "if not which DB will be the best to work with those many tables ?" Best of course being subjective... – billinkc Sep 12 '13 at 20:41
@billinkc Pedantic note. SQLRockstar has not provided any evidence though about the if not part. Shall we assume that he claims Oracle cannot handle that number of tables? – ypercubeᵀᴹ Sep 12 '13 at 21:15
It seems to be possible in Oracle:… – Sebastian Meine Sep 12 '13 at 21:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.