Mysql - Getting Table Comment

liunx

Guest
When you create a table in mySQL, you can add a comment to it. phpMyAdmin let's you do this as a text field at the bottom of the create table form, and the comment is added to the end of the create table query.<br /><br />My question is how to you retrieve the comment?? I found in the mySQL docs about how to set it in the create table statement, but couldn't find how to actually view it. phpMyAdmin displays it on your page when you view the table, so I know it's possible. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />Does anyone know? Or can point me to a really good mySQL reference site?<br /><br />*edit* for reference, here is the create table statement so that you can see what I'm talking about. I copied this from the statement phpMyAdmin created. The comment I want to retrieve is at the end. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->CREATE TABLE `test` (<br />`id` INT( 10 ) NOT NULL ,<br />`comment` VARCHAR( 50 ) NOT NULL ,<br />PRIMARY KEY ( `id` ) <br />) COMMENT = 'This is a test table.';<!--c2--></div><!--ec2--><br /><br />- Vendlus<!--content-->
Ugh... this is twice today that I've found my answer within minutes of posting here. (I really did look all morning for this answer before posting too. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />)<br /><br />Anywhat, <br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->SHOW TABLE STATUS<!--c2--></div><!--ec2--><br />does what I want. The comment is one of the fields returned. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />Thanks anyway to those of you that I know would have answered me. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /><br /><br /> Rock Sign<!--content-->
It is the TCH good luck karma at work! <br /><br />If you post, you WILL find an answer soon. Whether from other family members or by yourself!<br /><br />...dave<br /><br /> <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/kicking.gif" style="vertical-align:middle" emoid=":dance:" border="0" alt="kicking.gif" /><!--content-->
 
Back
Top