mysqlÖÐvarchar¿ÉÒÔ²»ÉèÖó¤¶ÈÂð
·ñ£¬mysql ÖÐ varchar Êý¾ÝÀàÐͱØÐèÖ¸¶¨³¤¶È£¬ÒÔ½ç˵Æä×î´ó×Ö·ûÊý¡£ÈôÊÇδָ¶¨³¤¶È£¬mysql ½«Å×ÍÉ»¯Îó¡£
MySQL ÖÐ VARCHAR ¿ÉÒÔ²»ÉèÖó¤¶ÈÂð£¿
ÃÕµ×£º·ñ
ÏêϸڹÊÍ£º
VARCHAR Êý¾ÝÀàÐÍÔÚ MySQL ÖбØÐèÖ¸¶¨³¤¶È£¬Ëü½ç˵Á˸ÃÊý¾ÝÀàÐÍ¿ÉÒÔÈÝÄɵÄ×î´ó×Ö·ûÊý¡£ÈôÊDz»Ö¸¶¨³¤¶È£¬MySQL ½«Å×ÍÉ»¯Îó£º
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'varchar' at line 1
µÇ¼ºó¸´ÖÆ
VARCHAR ³¤¶È¹ØÓÚÓÅ»¯ÐÔÄܺʹ洢¿Õ¼äÖÁ¹ØÖ÷Òª¡£ÈôÊÇÖ¸¶¨Á˲»Êʵ±µÄ³¤¶È£¬¿ÉÄܻᵼÖÂÊý¾Ý½Ø¶Ï»ò²»ÐëÒªµÄÄÚ´æÏûºÄ¡£
Òò´Ë£¬½ç˵ VARCHAR Êý¾ÝÀàÐÍʱ£¬Ê¼ÖÕ½¨ÒéÖ¸¶¨Ò»¸öºÏÊʵij¤¶È¡£¸Ã³¤¶ÈÓ¦»ùÓÚËùÒª´æ´¢µÄÊý¾ÝÖµµÄ×î´óÔ¤ÆÚ³¤¶È¡£
ÒÔÉϾÍÊÇmysqlÖÐvarchar¿ÉÒÔ²»ÉèÖó¤¶ÈÂðµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡
ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£