all tables with certain type

all tables with certain type

am 14.12.2009 18:25:51 von walter harms

hi list,
is it possible to get a list of all tables with a certain type in one statement ?

for now i collect all tables (show tables) and search for the type (show columns).
Any way to circumvent that ? make it one statement ?

re,
wh


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: all tables with certain type

am 14.12.2009 18:28:42 von Gary Smith

walter harms wrote:
> hi list,
> is it possible to get a list of all tables with a certain type in one statement ?
>
> for now i collect all tables (show tables) and search for the type (show columns).
> Any way to circumvent that ? make it one statement ?
>
use information_schema;

select column_name,data_type from columns where data_type='YOUR DATA
TYPE HERE';

Gary

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org