Actually I know how to create a view in SQL. But I am stuck with this one case.
One of my databases is creating tables monthly. For example table names are TL202001
, TL202002
, TL202003
, so next month new table will be TL202004
. All the tables have the same columns. But difference in data I want to generate a view for all this dynamic tables. But I don't know how to make logic for future tables. Let me know for this case View is possible and let me know your solution.
Please help!
I will explain again clearly,
Example:
- My Database name is TAS
- In the
TAS
database, every month a new table is created from a piece of software
For instance:
T_LG202001
T_LG202002
T_LG202003
T_LG202004 etc...
I want to create a view to for all these tables together. It will also need to consider future month's tables.
select *
from T_LG202001,T_LG202002,T_LG202003.........T_LG202030 etc.
Please let me know. now you are understand. I need to know that View is possible? Also let me know if possible solution.