mysql date
ÈÕÆÚº¯Êý£º
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html
http://hi.baidu.com/yase_guoguo/blog/item/171c2d4feea83c01b2de0527.html
SQL ʱ¼ä±È½Ï
select * from useroperation where '2009-10-26 00:00:00' < date; //dateµÄÀàÐÍÊÇdatetime
select * from useroperation where DATE_FORMAT('2009-10-26 00:00:00', '%Y-%m-%d %H:%i:%s') < date;
select * from useroperation where TO_DAYS(NOW()) - TO_DAYS(date) =0;
Ïà¹ØÎĵµ£º
×î½üÓöµ½Ò»¸öÐèÇóÒªÔÚlinuxÏÂÓÃjava µ÷ÓÃmysql¿Í»§¶ËÔ¶³ÌµÇ½mysql·þÎñÆ÷£¬´Ó¿Í»§¶Ë»úÆ÷µ¼Èëmysql½Å±¾£¬´Ómysql·þÎñÆ÷¶Ëµ¼³ö±íÖеÄÊý¾Ý¡£ÒÔÏÂÊÇÓõ½µÄÖ÷Òª·½·¨£º
Java ´úÂë
/**
* µ¼ÈëÊý¾Ý
* @param ½Å±¾µÄµØÖ·ºÍÃû³Æ
* @return ÊÇ·ñ³ ......
ÔÚMySQL 3.23.44°æ±¾ºó£¬InnoDBÒýÇæÀàÐ͵ıíÖ§³ÖÁËÍâ¼üÔ¼Êø¡£
Íâ¼üµÄʹÓÃÌõ¼þ£º
1.Á½¸ö±í±ØÐëÊÇInnoDB±í£¬MyISAM±íÔÝʱ²»Ö§³ÖÍâ¼ü£¨¾Ý˵ÒÔºóµÄ°æ±¾ÓпÉÄÜÖ§³Ö£¬µ«ÖÁÉÙÄ¿Ç°²»Ö§³Ö£©£»
2.Íâ¼üÁбØÐ뽨Á¢ÁËË÷Òý£¬MySQL 4.1.2ÒÔºóµÄ°æ±¾ÔÚ½¨Á¢Íâ¼üʱ»á×Ô¶¯´´½¨Ë÷Òý£¬µ«Èç¹ûÔÚ½ÏÔçµÄ°æ±¾ÔòÐèÒªÏÔʾ½¨Á¢£»
3.Íâ¼ü¹ØÏ ......
¶ÔÓÚʹÓà MySQL Õâ¸öÊý¾Ý¿âϵͳµÄÓû§À´Ëµ£¬Ëü²»½ö¿ªÔ´£¬Îȶ¨£¬Ð§ÂÊÒ²ºÜ¸ß¡£µ«ÓÐʱҲ»áÓöµ½Ò»Ð©ÐÔÄÜ·½ÃæµÄÎÊÌâ¡£Ò»°ãÇé¿ö¿ÉÄÜ»áÓÐÒÔϼ¸ÖÖ¿ÉÄÜ£º
1. Êý¾Ý±íµÄË÷ÒýûÓкÏÀíµÄ½¨ºÃ»òʹÓá£
2. SQLÓï¾ä¹ýÓÚ¸´ÔÓ£¬£¨×ó/ÓÒÁ¬½Ó£¬¶à±í²éѯµÈ£©¡£
3. ·þÎñÆ÷ÅäÖò»ºÏÀí¡£
4. ·þÎñÆ÷±¾ÉíµÄ´¦ÀíÄÜ ......
ÔÚwindowsÏÂ
£º
Æô¶¯£º
1.cd c:\mysql\bin
2.mysqld --console
¹Ø±Õ£º
1.cd c:\mysql\bin
......
<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå" ......