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

Mysql ʱ¼äº¯Êý»ã×Ü

 Ò»¡¢MySQL »ñµÃµ±Ç°ÈÕÆÚʱ¼ä º¯Êý
1.1 »ñµÃµ±Ç°ÈÕÆÚ+ʱ¼ä£¨date + time£©º¯Êý£ºnow()
mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2008-08-08 22:20:46 |
+---------------------+
³ýÁË now() º¯ÊýÄÜ»ñµÃµ±Ç°µÄÈÕÆÚʱ¼äÍ⣬MySQL Öл¹ÓÐÏÂÃæµÄº¯Êý£º
current_timestamp()
,current_timestamp
,localtime()
,localtime
,localtimestamp -- (v4.0.6)
,localtimestamp() -- (v4.0.6)
ÕâЩÈÕÆÚʱ¼äº¯Êý£¬¶¼µÈͬÓÚ now()¡£¼øÓÚ now() º¯Êý¼ò¶ÌÒ׼ǣ¬½¨Òé×ÜÊÇʹÓà now() À´Ìæ´úÉÏÃæÁгöµÄº¯Êý¡£
1.2 »ñµÃµ±Ç°ÈÕÆÚ+ʱ¼ä£¨date + time£©º¯Êý£ºsysdate()
sysdate() ÈÕÆÚʱ¼äº¯Êý¸ú now() ÀàËÆ£¬²»Í¬Ö®´¦ÔÚÓÚ£ºnow() ÔÚÖ´ÐпªÊ¼Ê±Öµ¾ÍµÃµ½ÁË£¬ sysdate() ÔÚº¯ÊýÖ´ÐÐʱ¶¯Ì¬µÃµ½Öµ¡£¿´ÏÂÃæµÄÀý×Ó¾ÍÃ÷°×ÁË£º
mysql> select now(), sleep(3), now();
+---------------------+----------+---------------------+
| now() | sleep(3) | now() |
+---------------------+----------+---------------------+
| 2008-08-08 22:28:21 | 0 | 2008-08-08 22:28:21 |
+---------------------+----------+---------------------+
mysql> select sysdate(), sleep(3), sysdate();
+---------------------+----------+---------------------+
| sysdate() | sleep(3) | sysdate() |
+---------------------+----------+---------------------+
| 2008-08-08 22:28:41 | 0 | 2008-08-08 22:28:44 |
+---------------------+----------+---------------------+
¿ÉÒÔ¿´µ½£¬ËäÈ»ÖÐ; sleep 3 Ã룬µ« now() º¯ÊýÁ½´ÎµÄʱ¼äÖµÊÇÏàͬµÄ£» sysdate() º¯ÊýÁ½´ÎµÃµ½µÄʱ¼äÖµÏà²î 3 Ãë¡£MySQL Manual ÖÐÊÇÕâÑùÃèÊö sysdate() µÄ£ºReturn the time at which the function executes¡£
sysdate() ÈÕÆÚʱ¼äº¯Êý£¬Ò»°ãÇé¿öϺÜÉÙÓõ½¡£
2. »ñµÃµ±Ç°ÈÕÆÚ£¨date£©º¯Êý£ºcurdate()
mysql> select curdate();
+------------+
| curdate() |
+------------+
| 2008-08-08 |
+------------+
ÆäÖУ¬ÏÂÃæµÄÁ½¸öÈÕÆÚº¯ÊýµÈͬÓÚ curdate()£º
current_date()
,current_date
3. »ñµÃµ±Ç°Ê±¼ä£¨time£©º¯Êý£ºcurtime()
mysql> select curtime();
+-----------+
| curtime() |
+-----------+
| 22:41:30 |
+-----------+
ÆäÖУ¬ÏÂÃæµÄÁ½¸öʱ¼äº¯ÊýµÈͬÓÚ curtime()£º
current_time()
,current_


Ïà¹ØÎĵµ£º

mysqlÐÔÄÜÓÅ»¯2

 MySQL´Ó4.1¿ªÊ¼Ö§³ÖSQLµÄ×Ó²éѯ¡£Õâ¸ö¼¼Êõ¿ÉÒÔʹÓÃSELECTÓï¾äÀ´´´½¨Ò»¸öµ¥ÁеIJéѯ½á¹û£¬È»ºó°ÑÕâ¸ö½á¹û×÷Ϊ¹ýÂËÌõ¼þÓÃÔÚÁíÒ»¸ö²éѯÖС£ÀýÈ磬ÎÒÃÇÒª½«¿Í»§»ù±¾ÐÅÏ¢±íÖÐûÓÐÈκζ©µ¥µÄ¿Í»§É¾³ýµô£¬¾Í¿ÉÒÔÀûÓÃ×Ó²éѯÏÈ´ÓÏúÊÛÐÅÏ¢±íÖн«ËùÓз¢³ö¶©µ¥µÄ¿Í»§IDÈ¡³öÀ´£¬È»ºó½«½á¹û´«µÝ¸øÖ÷²éѯ£¬ÈçÏÂËùʾ£º
DELETE from ......

aspºÍmysql·ÖÒ³´úÂë

 <!--#include file="zheboconn.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>aspºÍmysql·ÖÒ³´úÂë</title>
<style type="text/css">
<!--
.STYLE3 {
 fon ......

linuxÏÂapache£¬php,mysqlÕûºÏtomcat

1.Ç°ÃæһƪÎÄÕÂÏêϸ½éÉÜÁËÈçºÎÔÚWindowsÏÂÕûºÏapache+mysql+php+tomcat,ºÜ¼òµ¥£¬µ«ÊÇÔÚLinuxϾÍûÕâôÈÝÒ×ÁË£¬ÐèÒªÊÖ¹¤µÄȥдÅäÖÃÎļþ£¬ÍøÉϵÄ×ÊÁÏÓкܶ࣬µ«ÊÇÎÒ¸ù¾ÝËûÃǵÄд·¨£¬Ò»²½Ò»²½µÄÅäÖû¹ÊÇûÄÜsuccess!£¨¿ÉÄÜÊÇÎÒ¸öÈ˵ÄÔ­Òò£¬²»¹ý£¬ÎÞÂÛÔÚGoogle»¹ÊÇbaiduËѵ½µÄÎÄÕ¾ÍÄÇô¼¸Æª£¬Õâ¸öתһÏ£¬ÄǸöתһÏ£¬×îºó¶¼² ......

phpµ÷ÓÃmysql´æ´¢¹ý³Ì·µ»Ø¶à¸ö½á¹û¼¯µÄ´¦Àí

 ·µ»ØÒ»¸ö½á¹ûÈ«ÊÀ½ç¶¼ÖªµÀÔõô´¦Àí£¬¹Ø¼üÊÇ·µ»Ø¶à¸ö½á¹û¼¯¾Í²»ºÃ°ìÁË£¬ÏÂÃæÓÐÒ»½â¾ö°ì·¨
´æ´¢¹ý³Ì´úÂë
DELIMITER $$;
DROP PROCEDURE IF EXISTS `test`.`sp_test`$$
CREATE PROCEDURE `test`.`sp_test` ()
BEGIN
    select * from `user`.`user` limit 0, 50;
    select coun ......

Mysql½ø»¯ÂÛ2


MysqlËùÖ§³ÖµÄÒýÇæÄ¿Ç°ÓÐÒÔϼ¸ÖÖ£º
MyISAM,InnoDB,MERGE,MEMORY(HEAR),BDB(BerkeleyDB),EXAMPLE,FEDERATED,ARCHIVE,CSV,BLACKHOLE.
ΪʲôҪÓÐÕâô¶àÒýÇ棿Ö÷ÒªÊÇMysqlÊÇÒ»¿î¼«ÎªÇ¿´óµÄÊý¾Ý¿â£¬ËüÊÊÓ¦ºÜ¶à²»Í¬µÄÔËÐл·¾³£¬ÎªÁËÂú×ã¸÷ÖÖ²»Í¬µÄÔËÐл·¾³Óë´æ´¢·½°¸µÄÐèÒª£¬ÕâЩËÑË÷ÒýÇæÒ²¾ÍÓ¦Ô˶øÉú£¨²»¹âÊÇΪÁËÅäºÏMysql ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ