mysql½¨±í´íÎó - ÆäËûÊý¾Ý¿â¿ª·¢ / MySQL/Postgresql
ÓÃmysql½¨±íʱ³öÏÖ´íÎó1067 £ºinvalid default value for 'id'
idÊÇintÐ͵ģ¬ÎªÊ²Ã´²»ÄÜÉèÖÃĬÈÏÖµ¡£Óï¾äΪid int£¨4£©default '-1' null;³öÏÖ´íÎó¡£
Ìù³öÄãµÄ create table Óï¾ä£¬¼°ÄãµÄmysql °æ±¾¡£
µ±ÄúµÄÎÊÌâµÃµ½½â´ðºóÇ뼰ʱ½áÌù.
http://topic.csdn.net/u/20090501/15/7548d251-aec2-4975-a9bf-ca09a5551ba5.html
http://topic.csdn.net/u/20100428/09/BC9E0908-F250-42A6-8765-B50A82FE186A.html
ÓÐauto_increment ²»ÄÜdefault
»¹ÊÇÌù³öÄã×Ô¼ºµÄ½¨±íÓï¾ä±È½ÏºÃ
idÄãÊDz»ÊǸøÉèÖõÄÊÇÖ÷¼ü°¡£¬Ö÷¼üÄãÔõô¿ÉÒÔ¸øÒ»¸öĬÈÏÖµ°¡£¿
°Ñ'-1'¸ÄΪ-1ÊÔÊÔ£¬¼ÈÈ»ÓÐdefaultÖµ£¬¿ÉÒÔÖ¸¶¨Îªnot nullµÄ¡£
ÄãµÄÕâ¸öÓï¾äÆäʵÔÚ5.0ÀïÍ·ÊÇ¿ÉÒÔÖ´Ðе쬻³ÒÉÄãµÄmysql°æ±¾ÊDz»ÊÇÓеãµÍÁË¡£
Ïà¹ØÎÊ´ð£º
±àÒëÆ÷£ºC-Free4
mysql µ¥¶À°²×°µÄ£¬ÏÖÔÚΪapache+php+mysql¿ÉÒÔʹÓá£
×î½üÔÚÁ·Ï°c£¬c++£»ÏëÓÃc£¬c++Á¬½ÓÏÂÎÒµÄmysql£¬ºÃ¶àµØ·½¶à˵mysql.hÕÒ²»µ½¡£¶øÇÒÎÒmysqlûÓÐËùνµÄincludeÎļþ¼Ð°¡¡£
Íü¸ßÊÖÖ¸µãÒ»¶ ......
¸÷λÐÖµÜÇë½Ì Ï£¬ÔÚmysqlÖÐÄܲ»ÄÜʵÏÖÕâÑùÒ»¸ö¹¦ÄÜ£¬
Ò»¸ö×Ö¶ÎAÊÇ´¢´æÒ»´ó¶ÎÎÄ×ÖÄÚÈݵģ¬ÊÇÓ¢ÎÄ£¬Äܲ»ÄÜͨ¹ýMYSQLµÄ²éѯ֮ÀàµÄ¹¦ÄÜ£¬À´»ñµÃÕâ¸ö×Ö¶ÎÖÐ ³öÏÖÆµÂÊ×î¸ßµÄÊ®¸öµ¥´Ê£¬²¢½«ÕâÊ®¸öµ¥´Ê×öΪеÄ×ֶδ¢´æ
a ......
ÎÒÏÖÔÚÏëÓÃJSPʵÏÖQQÓÊÏäÀïµÄ¶¨Ê±·¢ËÍ£¬ÎÒÏëͨ¹ýÊý¾Ý¿â½øÐж¨Ê±²åÈëÊý¾Ý¡£
µ«²»ÖªµÀÈçºÎʵÏÖ£¬»òÕß´ó¼ÒÓиüºÃµÄ·½·¨£¬²»Ò»¶¨ËµÊÇÊý¾Ý¿â¡£
Çë´ó¼Ò¸øµãÒâ¼û£¬°ÝлÀ²¡£
quataz¶¨Ê±Æ÷×é¼þÊǸöºÜºÃµÄ½â¾ö·½°¸¡£
È ......
3̨µçÄÔ£¬ÆäÖÐһ̨×÷ΪMYSQL·þÎñÆ÷£¬ÁíÍâ2̨ΪTOMCAT·þÎñÆ÷¡£
MYSQL·þÎñÆ÷ÀïÓÐÒ»Ìõ¼Ç¼£¬ IDΪ10.
ÏÖÔÚ2̨TOMCATͬʱ£¨100%£©·¢ÆðÐÞ¸ÄMYSQLÀïIDΪ10µÄÄÇÌõ¼Ç¼£¬±ÈÈçÐ޸ĴËID¼Ç¼ÀïijһÏîµÄÄÚÈÝ¡£ ±ÈÈçTOMCAT 1Ò ......
½ñÌìÏëµ½¸öÎÊÌ⣬mysql¿ÉÒÔµ¼³ö±í£¬Êý¾Ý¿â£¬Ôõôµ¼³öij¸ö×ֶεÄÊý¾ÝÄØ£¿²»ÖªµÀ´ó¼ÒÓÐûÓÐÕâôÊÔ¹ýµÄ£¿ÊDz»Êǵ¼³öÊý¾ÝµÄ×îСµ¥Î»¾ÍÊÇ±í£¿
Óù¤¾ß¿ÉÒÔÑ¡ÔñÁе쬱ÈÈçsqlyog
лл£¬ÒѾ½â¾ö£¬ÎÒÓõÄÊÇÃüÁºÇºÇ
......