Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

´¦ÀíMySQLÖÐ0ʱʱ¼äÊý¾ÝÎÊÌâµÄ°ì·¨

ÏÖÏó£º
      ÔÚMysqlÊý¾Ý¿âÖÐʹÓÃDATETIMEÀàÐÍÀ´´æ´¢Ê±¼ä Ò»°ãÇé¿öÏÂ×îºÃÔÚjdbcÖÐʹÓÃgetTimestamp()·½·¨»ñÈ¡Timestamp¸ñʽµÄʱ¼ä£¬È»ºóÔÚת»¯³ÉJavaµÄDate¡£Èç¹ûÓöµ½ÒªÔÚResultSet »ñȡֵΪ”»ò’0000-00-00 00:00:00′ÕâÑùµÄÊý¾Ýʱ£¨rs.getDate(’gmt_sync’)»ò rs.getTimestamp(’gmt_sync’)µÈÀàËÆ·½·¨£©£¬¾Í»á³öÏÖÈçÏ£º
      java.sql.SQLException: Value ‘0000-00-00 00:00:00′ can not be represented as java.sql.Date£»
»òÊÇ
      java.sql.SQLException: Cannot convert value ‘0000-00-00 00:00:00′ from column 12 to TIMESTAMP.
      ÕâÊÇÒòΪJDBC²»Äܽ«’0000-00-00 00:00:00′ת»¯ÎªÒ»¸öΪһ¸öjava.sql.Timestamp£¬ÔÚJavaÖУ¬Ïë´´½¨Ò»¸öjava.util.Date£¬Ê¹ÆäֵΪ ‘0000-00-00′Ò²ÊDz»¿ÉÄܵģ¬×î¹ÅÀϵÄÈÕÆÚÓ¦¸ÃÊÇ’0001-01-01 00:00:00′¡£
½â¾ö£º
      ÔÚurlÖмÓÈëzeroDateTimeBehavior=convertToNull Èç:jdbc:mysql://10.2.225.97/c2c?zeroDateTimeBehavior=convertToNull
ÕâÑùÔÚ´¦ÀíÈçÉÏÊý¾Ýֵʱ£¬½«»á·µ»Ønull£¬ÕâÑù¾Í¿ÉÒÔ×öÏàÓ¦µÄ´¦ÀíÁË¡£


Ïà¹ØÎĵµ£º

mysql ·Ö×é»ã×Ü

 1.´´½¨±í£º
    create table groupTable(dept varchar(6),phone varchar(20),amount int);
 2.²åÈë²âÊÔÊý¾Ý£º
    insert groupTable
    select 'ÓªÒµ²¿',8001,20 union all
    select 'ÓªÒµ²¿',8002,30 union all
    se ......

MySQLѧϰ

×öÈí¼þÊý¾Ý¿â±Ø²»¿ÉÉÙ£¬ÎÒÑ¡ÔñÁËMySQL¡£
Ê×Ïȵ½http://dev.mysql.com/downloads/ÏÂÔØºÃMySQL5.1ºÍMySQL GUI TOOLS
ϵ½µçÄÔÉÏ,È»ºó°²×°£¬ÏÈ×°5.1ÔÙ×°gui tools ,һ·ȷ¶¨°É¡£
ŪºÃºó£¬µã¿ªMySQL Query Browser£¬¾Í¿ÉÒÔ²Ù×÷Êý¾Ý¿âÁË¡£
MySQLµÄÇý¶¯³ÌÐòÊÇGUITOOLS°²×°Ä¿Â¼/java/libϵÄmysql-connector-java-5.0.4-bin.ja ......

jira+tomcat+mysqlµÄ¼¯³É

ÒÔǰû½Ó´¥¹ýÕâ¸ö¶«¶«£¬Ç°ÌìÒ»¸öͬÊÂÈÃÎÒ°²×°ÏÂjira+confluence£¬µ«ÊÇconfluenceŪÁ˺ó¤Ê±¼äҲû¼¯³É³É¹¦£¡ÏÖÔÚ°ÑÉÏÊöÈýÕߵɹý³Ì×ܽáÏ£¡
°²×°»·¾³£º
ϵͳ£ºxp sp2 
jdk:  1.6
tomcat: 5.5 °²×°°æ   (¿ÉÒÔÓýâѹ°æµÄ)
MySql: 5.0.x
ËùÐèÈí¼þ£º
jiar£º atlassian-jira-enterprise-3.9.3.zi ......

mysql´íÎó¼°½â¾öÈ«¹¥ÂÔ

10055:ûÓлº´æ¿Õ¼ä¿ÉÀûÓà  ·½·¨:²é¿´ÏÂÄãµÄCÅ̿ռäÊÇ·ñÒѾ­Âú,Çå³ýһЩûÓÐÓõÄÎļþ.   ¿ÉÒÔÔÚºǫ́µÄ"ÂÛ̳ºËÐÄÉèÖÃ","ºËÐŦÄÜÉèÖÃ"Àï"½ø³ÌÓÅ»¯"¿ªÆô,"GZIP ѹËõÊä³ö"¹Ø±Õ. ²éÕÒÁËÒ»ÏÂ10055£¨Ã»Óлº´æ
˵Ã÷:Èç¹ûÓöµ½Êý¾Ý¿â³ö´íµÄÎÊÌâÐÞ¸ÄÏàÓ¦µÄ´úÂëºóÒ»°ãÒªÖØÆômysql¡£Èç¹ûÓöµ½mysqlµÄÎÊÌâ¿ÉÒÔÏÈÖØÆ ......

MySQL Ë÷ÒýdzÎö

Ô­ÎÄÁ´½Ó£ºhttp://hi.baidu.com/171892549/blog/item/14818d0ac616ee34b1351dbd.html
ÔÚÊý¾Ý¿â±íÖУ¬Ê¹ÓÃË÷Òý¿ÉÒÔ´ó´óÌá¸ß²éѯËÙ¶È¡£
¼ÙÈçÎÒÃÇ´´½¨ÁËÒ»¸ö testIndex ±í£º
CREATE TABLE testIndex(i_testID INT NOT NULL,vc_Name VARCHAR(16) NOT NULL);
ÎÒÃÇËæ»úÏòÀïÃæ²åÈëÁË 1000 Ìõ¼Ç¼£¬ÆäÖÐÓÐÒ»Ìõ i_testID vc_Name ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ