marrowyung
asked on
filter out mySQL table name
Dear all,
right now try to filter out table name with prefxi tblT_ so we don't want this kind of table from showing out, my query is :
and I try to test the result set by only show out table has prefix like that:
but it seems MySQL will return all table with name prefix with tblT% instead of what we want : tblT_xxxxxx
how to solve this ?
right now try to filter out table name with prefxi tblT_ so we don't want this kind of table from showing out, my query is :
SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA=<databaseName> and table_type<> 'view' and TABLE_NAME NOT LIKE 'tblT_%';
and I try to test the result set by only show out table has prefix like that:
SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA=<databaseName> and table_type<> 'view' and TABLE_NAME LIKE 'tblT_%';
but it seems MySQL will return all table with name prefix with tblT% instead of what we want : tblT_xxxxxx
how to solve this ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ASKER