I'm trying to select, from mysql, some specific tables that matches a pattern.
The specific pattern I'm looking for is like 'my_table_number
'. For example, my_table_436814
or my_table_35413
. The thing is that there are other tables that looks like my_table_old_14353
or my_table_351434_times
. I just want to filter out the ones that are my_table_number
.
I have tried different patterns, but failed to get what I really need.
The most closest approach was with this:
select table_name from
information_schema.columns ca
where ca.table_name REGEXP '[0-9]$'
How can I achieve what I'm looking for?