<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Overview of MySQL information_schema Database With Practical Examples</title>
	<atom:link href="http://www.thegeekstuff.com/2008/11/overview-of-mysql-information_schema-database-with-practical-examples/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thegeekstuff.com/2008/11/overview-of-mysql-information_schema-database-with-practical-examples/</link>
	<description>Guides, HowTos and Tips for Technology Geeks</description>
	<lastBuildDate>Thu, 09 Feb 2012 13:04:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Malaney</title>
		<link>http://www.thegeekstuff.com/2008/11/overview-of-mysql-information_schema-database-with-practical-examples/comment-page-1/#comment-56908</link>
		<dc:creator>Malaney</dc:creator>
		<pubDate>Sun, 01 Aug 2010 03:44:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=261#comment-56908</guid>
		<description>Great article!  Just a small correction to your query to retrieve 5 largest tables.  As it is written above, the query will order alphabetically, so that 9M comes before 122M.  Use the sql &quot;abs&quot; function to order data_length numerically.  Your query above becomes:

mysql&gt; SELECT concat(table_schema,&#039;.&#039;,table_name) table_name,
    -&gt; concat(round(data_length/(1024*1024),2),&#039;M&#039;) data_length
    -&gt; FROM information_schema.TABLES
    -&gt; ORDER BY abs(data_length) DESC LIMIT 5;</description>
		<content:encoded><![CDATA[<p>Great article!  Just a small correction to your query to retrieve 5 largest tables.  As it is written above, the query will order alphabetically, so that 9M comes before 122M.  Use the sql &#8220;abs&#8221; function to order data_length numerically.  Your query above becomes:</p>
<p>mysql&gt; SELECT concat(table_schema,&#8217;.',table_name) table_name,<br />
    -&gt; concat(round(data_length/(1024*1024),2),&#8217;M') data_length<br />
    -&gt; FROM information_schema.TABLES<br />
    -&gt; ORDER BY abs(data_length) DESC LIMIT 5;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pushpesh Singh</title>
		<link>http://www.thegeekstuff.com/2008/11/overview-of-mysql-information_schema-database-with-practical-examples/comment-page-1/#comment-44981</link>
		<dc:creator>Pushpesh Singh</dc:creator>
		<pubDate>Thu, 29 Apr 2010 07:57:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=261#comment-44981</guid>
		<description>Hi  JuanPablo,

You can go like this :

$link = mysql_connect(&#039;host&#039;, &#039;user&#039;, &#039;password&#039;);
mysql_select_db(&#039;database&#039;, $link);

$sql = &#039;select table_name from information_schema.tables where table_schema=&quot;miDB&quot;&#039;;
$run = mysql_query($sql, $link) or die(mysql_error());

if($run &amp;&amp; mysql_num_rows($run) &gt; 0) {
   $query = &#039;YOUR_QUERY_HERE&#039;;

   mysql_select_db(&quot;miDB&quot;, $link);

   while(($fetch = mysql_fetch_assoc($run)) !== false) {
       $exec = mysql_query($query, $link);

     // process your o/p here....
   }
}

hope it helps ! :)

Regards,

Pushpesh</description>
		<content:encoded><![CDATA[<p>Hi  JuanPablo,</p>
<p>You can go like this :</p>
<p>$link = mysql_connect(&#8216;host&#8217;, &#8216;user&#8217;, &#8216;password&#8217;);<br />
mysql_select_db(&#8216;database&#8217;, $link);</p>
<p>$sql = &#8216;select table_name from information_schema.tables where table_schema=&#8221;miDB&#8221;&#8216;;<br />
$run = mysql_query($sql, $link) or die(mysql_error());</p>
<p>if($run &amp;&amp; mysql_num_rows($run) &gt; 0) {<br />
   $query = &#8216;YOUR_QUERY_HERE&#8217;;</p>
<p>   mysql_select_db(&#8220;miDB&#8221;, $link);</p>
<p>   while(($fetch = mysql_fetch_assoc($run)) !== false) {<br />
       $exec = mysql_query($query, $link);</p>
<p>     // process your o/p here&#8230;.<br />
   }<br />
}</p>
<p>hope it helps ! <img src='http://www.thegeekstuff.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Regards,</p>
<p>Pushpesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pushpesh Singh</title>
		<link>http://www.thegeekstuff.com/2008/11/overview-of-mysql-information_schema-database-with-practical-examples/comment-page-1/#comment-44976</link>
		<dc:creator>Pushpesh Singh</dc:creator>
		<pubDate>Thu, 29 Apr 2010 07:47:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=261#comment-44976</guid>
		<description>Hi Anshul,

You can use the following query to retrieve all the column names for a given database :

SELECT DISTINCT `COLUMN_NAME`
FROM `COLUMNS`
WHERE `TABLE_SCHEMA` = &#039;YOUR_DATABASE_NAME_HERE&#039;
AND `TABLE_NAME` = &#039;YOUR_TABLE_NAME_HERE&#039;;

hope it helps! :)

Regards,

Pushpesh</description>
		<content:encoded><![CDATA[<p>Hi Anshul,</p>
<p>You can use the following query to retrieve all the column names for a given database :</p>
<p>SELECT DISTINCT `COLUMN_NAME`<br />
FROM `COLUMNS`<br />
WHERE `TABLE_SCHEMA` = &#8216;YOUR_DATABASE_NAME_HERE&#8217;<br />
AND `TABLE_NAME` = &#8216;YOUR_TABLE_NAME_HERE&#8217;;</p>
<p>hope it helps! <img src='http://www.thegeekstuff.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Regards,</p>
<p>Pushpesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshul Agarwal</title>
		<link>http://www.thegeekstuff.com/2008/11/overview-of-mysql-information_schema-database-with-practical-examples/comment-page-1/#comment-41309</link>
		<dc:creator>Anshul Agarwal</dc:creator>
		<pubDate>Wed, 31 Mar 2010 18:48:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=261#comment-41309</guid>
		<description>Hi!
     Plz tell me how can i retrieve  the column names of a table from the information schema.</description>
		<content:encoded><![CDATA[<p>Hi!<br />
     Plz tell me how can i retrieve  the column names of a table from the information schema.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JuanPablo</title>
		<link>http://www.thegeekstuff.com/2008/11/overview-of-mysql-information_schema-database-with-practical-examples/comment-page-1/#comment-25634</link>
		<dc:creator>JuanPablo</dc:creator>
		<pubDate>Fri, 11 Dec 2009 01:16:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=261#comment-25634</guid>
		<description>hi, 

how I can use  select table_name from information_schema.tables where table_schema=&quot;miDB&quot; in a query ? 

and make same query over every table of mi db?

thanks.</description>
		<content:encoded><![CDATA[<p>hi, </p>
<p>how I can use  select table_name from information_schema.tables where table_schema=&#8221;miDB&#8221; in a query ? </p>
<p>and make same query over every table of mi db?</p>
<p>thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leslie Satenstein  Montreal Canada</title>
		<link>http://www.thegeekstuff.com/2008/11/overview-of-mysql-information_schema-database-with-practical-examples/comment-page-1/#comment-8756</link>
		<dc:creator>Leslie Satenstein  Montreal Canada</dc:creator>
		<pubDate>Sat, 18 Apr 2009 18:49:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=261#comment-8756</guid>
		<description>Hi Ramesh.

In working with some sophisticated ERPs, (Baan), their sql for retrievals appears like this

select      xxxxxxx
from        xxxxxxxx
where     
               xxxxxxx
selectdo 
               xxxxxxx
selectempty
               xxxxxxxx
selecteos
              xxxxxxxxx
endselect

The where clause can have other selects (recursive).  such as from where exists (select ... ) 
The where clause always did a left join, so the programmer decided if he wanted  
where a = b,   
or wanted
where b=a

selectdo 
          loop here until empty
selecteos
         after the last match 
selectempty
         if there is no match
endselect

The from clause indicated if it was for update,  etc.  A break command and continue are supported in the seledtdo as well as the selecteos.



How difficult is it to develop this set of statements as  a pre-parser expression for mysql, or oracle, or postgressql ?</description>
		<content:encoded><![CDATA[<p>Hi Ramesh.</p>
<p>In working with some sophisticated ERPs, (Baan), their sql for retrievals appears like this</p>
<p>select      xxxxxxx<br />
from        xxxxxxxx<br />
where<br />
               xxxxxxx<br />
selectdo<br />
               xxxxxxx<br />
selectempty<br />
               xxxxxxxx<br />
selecteos<br />
              xxxxxxxxx<br />
endselect</p>
<p>The where clause can have other selects (recursive).  such as from where exists (select &#8230; )<br />
The where clause always did a left join, so the programmer decided if he wanted<br />
where a = b,<br />
or wanted<br />
where b=a</p>
<p>selectdo<br />
          loop here until empty<br />
selecteos<br />
         after the last match<br />
selectempty<br />
         if there is no match<br />
endselect</p>
<p>The from clause indicated if it was for update,  etc.  A break command and continue are supported in the seledtdo as well as the selecteos.</p>
<p>How difficult is it to develop this set of statements as  a pre-parser expression for mysql, or oracle, or postgressql ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Show the largest MySQL tables on a box &#124; tail -f findings.out</title>
		<link>http://www.thegeekstuff.com/2008/11/overview-of-mysql-information_schema-database-with-practical-examples/comment-page-1/#comment-3368</link>
		<dc:creator>Show the largest MySQL tables on a box &#124; tail -f findings.out</dc:creator>
		<pubDate>Sat, 29 Nov 2008 01:23:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=261#comment-3368</guid>
		<description>[...] This post shows some handy things you can do with the information_schema database created by default in instances of MySQL 5. I especially liked the query to show the largest five tables in a given instance. I wrapped that query in a Python script, and after adding a bash alias to where that code lives, I can now do: [...]</description>
		<content:encoded><![CDATA[<p>[...] This post shows some handy things you can do with the information_schema database created by default in instances of MySQL 5. I especially liked the query to show the largest five tables in a given instance. I wrapped that query in a Python script, and after adding a bash alias to where that code lives, I can now do: [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Content Delivery Network via Amazon Web Services: CloudFront: static.thegeekstuff.com

Served from: www.thegeekstuff.com @ 2012-02-09 15:56:36 -->
