hi, I'm new for Mysql how to list all tables in MYSQL DB starting with "T" Tx in adv
A:
I use this inside mysql shell program:
use information_schema; select table_name from tables where table_name like 't%';
rtacconi
2009-07-16 07:07:44
+4
A:
The true ANSI way:
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME LIKE 'T%'
Doesn't assume the presence or behaviour of the USE function. This should work in every DBMS supporting the ANSI INFORMATION_SCHEMA views, which definitely includes MySQL.
David M
2009-07-16 07:14:21