mysqlÖÐdescribeºÍshowµÄÇø±ð
describe ÐÎò±í½á¹¹£¨ÁÐÃû¡¢Êý¾ÝÀàÐÍ¡¢Ô¼Êø¡¢Ë÷Òý£©£¬½öÊÊÓÃÓÚ±í¹¤¾ß¡£¶ø show ÏÔʾÓйØÊý¾Ý¿â¹¤¾ß£¨Êý¾Ý¿â¡¢±í¡¢ÁС¢º¯Êý¡¢Àú³ÌµÈ£©µÄÔªÊý¾Ý£¬°üÀ¨±íÖÐÁеļòÒªÁбíºÍÊý¾Ý¿âЧÀÍÆ÷µÄÔËÐÐʱÐÅÏ¢¡£
MySQL ÖÐ DESCRIBE ºÍ SHOW µÄÇø±ð
MySQL ÖÐµÄ DESCRIBE ºÍ SHOW ÏÂÁîÓÃÓÚ»ñÈ¡ÓйØÊý¾Ý¿â¹¤¾ßµÄÐÅÏ¢¡£ËäÈ»ËüÃÇÓÐһЩÏàËÆÖ®´¦£¬µ«ËüÃÇÔÚÓÃ;ºÍ¹¦Ð§ÉÏÈ´±£´æ²î±ð£º
ÓÃ;
DESCRIBE: ÐÎòÌض¨±íµÄ½á¹¹£¬°üö¾ÙÃû¡¢Êý¾ÝÀàÐÍ¡¢Ô¼ÊøºÍË÷Òý¡£
SHOW: ÏÔʾÓйØÊý¾Ý¿âЧÀÍÆ÷¡¢Êý¾Ý¿â¡¢±íºÍÖÖÖÖ¹¤¾ßµÄÔªÊý¾Ý¡£
¹¦Ð§
DESCRIBE
½ö×÷ÓÃÓÚ±í¹¤¾ß¡£
Êä³öÏêϸµÄ±í½á¹¹ÐÅÏ¢£¬°üÀ¨£º
ÁÐÃû
Êý¾ÝÀàÐÍ
¿É¿ÕÐÔ
Ö÷¼üºÍÍâ¼üÔ¼Êø
ĬÈÏÖµ
Ë÷ÒýÐÅÏ¢
SHOW
¿É×÷ÓÃÓÚ²î±ðµÄ¹¤¾ß£¬°üÀ¨Êý¾Ý¿â¡¢±í¡¢ÁС¢º¯ÊýºÍÀú³Ì¡£
Êä³ö¸ü¸ß¼¶±ðµÄÔªÊý¾ÝÐÅÏ¢£¬ÀýÈ磺
Êý¾Ý¿âºÍ±íÐÅÏ¢
±íÖÐÁеļòÒªÁбí
Ë÷Òý¡¢Íâ¼üºÍ´¥·¢Æ÷
Êý¾Ý¿âЧÀÍÆ÷µÄÔËÐÐʱÐÅÏ¢
Óï·¨
DESCRIBE: DESCRIBE table_name;
SHOW: SHOW [option] object_name;
ÀýÈ磺
Éó²é±í users µÄ½á¹¹£ºDESCRIBE users;
ÏÔʾÊý¾Ý¿â mydb ÖеÄËùÓÐ±í£ºSHOW TABLES IN mydb;
×ܽá
DESCRIBE: ÏêϸÐÎò±í½á¹¹¡£
SHOW: ÏÔʾÓйØÖÖÖÖÊý¾Ý¿â¹¤¾ßµÄÔªÊý¾Ý¡£
ÒÔÉϾÍÊÇmysqlÖÐdescribeºÍshowµÄÇø±ðµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡