Using SQL SERVER.
The database contains data from different years, somehow I want to fetch all the data (all the years) and show to the user, for example, database contains table:
table
--------
records_2000_01
records_2000_02
records_2000_03
...
now through select TABLE_NAME into @tableName from information_schema.tables where table_name like 'records_%'
I can fetch all the table name, how to write a SQL (or perhaps procedure) to fetch all data from these tables? make all record into one table?
thx.