Probably not the cause, but you should know that and binds more tightly than or, so what
you've written is actually
WHERE (table_name = 'hc_categories')
OR (table_name = 'hc_master')
OR (table_name = 'hc_web' AND table_schema = 'pdc_crawler')
What you probably mean is
WHERE (table_name = 'hc_categories' OR table_name = 'hc_master' OR table_name = 'hc_web')
AND (table_schema = 'pdc_crawler')
As to why the query doesn't provide the three tables... not really an idea - the contents
of your information_schema.tables table might provide insight :-)
----- Original Message -----
> From: "Adarsh Sharma" <adarsh.sharma@stripped>
> To: mysql@stripped
> Sent: Tuesday, 15 March, 2011 5:56:17 AM
> Subject: Unexpected Select Output
> Dear all,
> Today I shoot a query to know the size of tables in a particular
> database, but don't know why it prints only the output of only one
> table. Here is my query & output :
> mysql> SELECT table_schema 'database',table_name 'Table', concat(
> round(
> sum( data_length + index_length ) / ( 1024*1024*1024) , 2 ) , 'G' )
> sizeGB,concat( round( sum( data_length + index_length ) / (
> 1024*1024) ,
> 2 ) , 'M' ) sizeMB,concat( round( sum( data_length + index_length ) /
> (
> 1024) , 2 ) , 'K' ) sizeKB FROM information_schema.TABLES WHERE
> table_name ='hc_categories' or table_name='hc_master' or
> table_name='hc_web' and table_schema='pdc_crawler';
> -> ;
> +-------------+---------------+--------+--------+--------+
> +-------------+---------------+--------+--------+--------+
> +-------------+---------------+--------+--------+--------+
> Why it is not able to print all table that fits in OR condition.
> Thanks & best Regards,
> Adarsh Sharma
--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel