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

MysqlÊýѧº¯Êý½âÎö

ËùÓеÄÊýѧº¯ÊýÔÚÒ»¸ö³ö´íµÄÇé¿öÏ·µ»ØNULL¡£ 

µ¥Ä¿¼õ¡£¸Ä±ä²ÎÊýµÄ·ûºÅ¡£ 
mysql> select - 2; 
×¢Ò⣬Èç¹ûÕâ¸ö²Ù×÷·ûÓëÒ»¸öBIGINTʹÓ㬷µ»ØÖµÊÇÒ»¸öBIGINT£¡ÕâÒâζ×ÅÄãÓ¦¸Ã±ÜÃâÔÚÕûÊýÉÏʹÓÃ-£¬ÄÇ¿ÉÄÜÓÐÖµ-2^63£¡ 
ABS(X)
·µ»ØXµÄ¾ø¶ÔÖµ¡£ 
mysql> select ABS(2); 
-> 2 
mysql> select ABS(-32); 
-> 32 
¸Ã¹¦ÄÜ¿É°²È«ÓÃÓÚBIGINTÖµ¡£ 
SIGN(X) 
·µ»Ø²ÎÊýµÄ·ûºÅ£¬Îª-1¡¢0»ò1£¬È¡¾öÓÚXÊÇ·ñÊǸºÊý¡¢Áã»òÕýÊý¡£ 
mysql> select SIGN(-32); 
-> -1 
mysql> select SIGN(0); 
-> 0 
mysql> select SIGN(234); 
-> 1 
MOD(N,M) 
¡¡ 

Ä£ (ÀàËÆCÖеÄ%²Ù×÷·û)¡£·µ»ØN±»M³ýµÄÓàÊý¡£ 
mysql> select MOD(234, 10); 
-> 4 
mysql> select 253 % 7; 
-> 1
mysql> select MOD(29,9); 
-> 2
Õâ¸öº¯Êý¿É°²È«ÓÃÓÚBIGINTÖµ¡£ 
FLOOR(X) 
·µ»Ø²»´óÓÚXµÄ×î´óÕûÊýÖµ¡£ 
mysql> select FLOOR(1.23); 
-> 1 
mysql> select FLOOR(-1.23); 
-> -2 
×¢Òâ·µ»ØÖµ±»±ä»»ÎªÒ»¸öBIGINT£¡ 
CEILING(X) 
·µ»Ø²»Ð¡ÓÚXµÄ×îСÕûÊýÖµ¡£ 
mysql> select CEILING(1.23); 
-> 2 
mysql> select CEILING(-1.23); 
-> -1 
×¢Òâ·µ»ØÖµ±»±ä»»ÎªÒ»¸öBIGINT£¡ 
ROUND(X) 
·µ»Ø²ÎÊýXµÄËÄÉáÎåÈëµÄÒ»¸öÕûÊý¡£ 
mysql> select ROUND(-1.23); 
-> -1 
mysql> select ROUND(-1.58); 
-> -2 
mysql> select ROUND(1.58); 
-> 2 
×¢Òâ·µ»ØÖµ±»±ä»»ÎªÒ»¸öBIGINT! 
ROUND(X,D) 
·µ»Ø²ÎÊýXµÄËÄÉáÎåÈëµÄÓÐDΪСÊýµÄÒ»¸öÊý×Ö¡£Èç¹ûDΪ0£¬½á¹û½«Ã»ÓÐСÊýµã»òСÊý²¿·Ö¡£ 
mysql> select ROUND(1.298, 1); 
-> 1.3 
mysql> select ROUND(1.298, 0); 
-> 1 
×¢Òâ·µ»ØÖµ±»±ä»»ÎªÒ»¸öBIGINT! 
EXP(X) 
·µ»ØÖµe£¨×ÔÈ»¶ÔÊýµÄµ×£©µÄX´Î·½¡£ 
mysql> select EXP(2); 
-> 7.389056 
mysql> select EXP(-2); 
-> 0.


Ïà¹ØÎĵµ£º

¾­µäµÄMYSQLÓï¾ä

·Ç³£³£Óõģº¾­µäµÄMYSQLÓï¾ä…… php¿ªÔ´
ÕâÕæÊÇÒ»¸öºÃ¶«Î÷£ºÑ§Ï°ºÃÁ˺ÜÊÜÓõÄŶ……
SQL·ÖÀࣺ
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(Create£¬Alter£¬Drop£¬DECLARE)
DML—Êý¾Ý²Ù×ÝÓïÑÔ(Select£¬Delete£¬Update£¬Insert)
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK)php¿ªÔ´
Ê×ÏÈ,¼òÒ ......

ÓÃpythonÁ¬½ÓmysqlÊý¾Ý¿â


#
-*- encoding: gb2312 -*-
import
os, sys, string
import
MySQLdb
#
Á¬½ÓÊý¾Ý¿â
try
:
conn
=
MySQLdb.connect(host
=
'
localhost
'
,user
=
'
root
'
,passwd
=
'
xxxx
'
,db
=
'
test1
'
)
except
Exception, e:
print
e
sys.exit()
......

MySQL¶¯Ô±14000ÈËÇ©Ãû·´¶Ô¼×¹ÇÎÄSun½»Ò×

¾Ý¹úÍâýÌ屨µÀ£¬MySQLÊý¾Ý¿âµÄ¿ª·¢ÕßMichael WideniusÒÔ¼°²¿·ÖÏà¹ØÈËÊ¿½üÈÕÏòÅ·ÖÞ¡¢ÖйúÓë¶íÂÞ˹µÄ¼à¹Ü»ú¹¹Ìá½»Á˶Լ׹ÇÎÄ-Sun½»Ò׵ķ´¶ÔÒâ¼û£¬ÓдóÔ¼14000ÈËÔÚ¸ÃÒâ¼ûÉÏÇ©×Ö±íʾËûÃǶԴËÊÕ¹ºµÄ·´¶Ô¡£Å·ÃËίԱ»á´ËÇ°Ôø·´¶Ô¼×¹ÇÎÄÊÕ¹ºSun£¬µ«Õâһ¢¶ÏÉó²é»ú¹¹ÔÚ12ÔÂÓֳƣ¬¶Ô´Ë½»Ò×´ï³ÉÒ»¸öÂúÒâµÄ½á¹û±íʾÀÖ¹Û¡£Å·ÃËίԱ»á½«Ô ......

MySQLÊý¾Ý¿âÎļþ½éÉÜ

±¾ÎÄÁ´½Óhttp://www.chysoft.net/files/article_234.htm ¸ü¶à×ÊѶÇë½øÈëwww.chysoft.net 
mysqlµÄÊý¾Ý´¢´æĿ¼ÔÚmysqlµÄÅäÖÃÎļþmy.iniÎļþÉèÖ㬸ñʽÈçÏ£º
# Uncomment the following rows if you move the MySQL distribution to another
# location
basedir = d:/cyoa/mysql_cy/
datadir = d:/cyoa/mysq ......

MySQLÊý¾Ý¿â±¸·ÝÓë»Ö¸´

·½·¨Ò»£º
1.µ¼³öÕû¸öÊý¾Ý¿â
ÃüÁîÐнøÈëµ½mysql°²×°Ä¿Â¼µÄbinĿ¼ÏÂ
¼ÙÉè×°ÔÚD:/mysql/bin
¼´£º¿ªÊ¼ ÔËÐÐ ÊäÈëcmd
d:
cd mysql/bin
È»ºóÖ´ÐÐÏÂÃæÓï¾ä
mysqldump -u Óû§Ãû -p Êý¾Ý¿âÃû > µ¼³öµÄÎļþÃû  
ʾÀý£ºmysqldump -u root -p sq_wcnc > d:\wcnc.sql
2.»Ö¸´Êý¾Ý¿â
   ³£ÓÃsource ÃüÁî ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ