MYSQLºÍORACLEµÄһЩ²Ù×÷Çø±ð
ÓкܶàÓ¦ÓÃÏîÄ¿, ¸ÕÆð²½µÄʱºòÓÃMYSQLÊý¾Ý¿â»ù±¾ÉÏÄÜʵÏÖ¸÷ÖÖ¹¦ÄÜÐèÇó£¬Ëæ×ÅÓ¦ÓÃÓû§µÄÔö¶à£¬Êý¾ÝÁ¿µÄÔö¼Ó£¬MYSQL½¥½¥µØ³öÏÖ²»¿°ÖظºµÄÇé¿ö£º
Á¬½ÓºÜÂýÉõÖÁå´»ú£¬ÓÚÊǾÍÓаÑÊý¾Ý´ÓMYSQLǨµ½ORACLEµÄÐèÇó£¬Ó¦ÓóÌÐòÒ²ÒªÏàÓ¦×öһЩÐ޸ġ£±¾ÈË×ܽá³öÒÔϼ¸µã×¢ÒâÊÂÏϣÍû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
1£® ×Ô¶¯Ôö³¤µÄÊý¾ÝÀàÐÍ´¦Àí
MYSQLÓÐ×Ô¶¯Ôö³¤µÄÊý¾ÝÀàÐÍ£¬²åÈë¼Ç¼ʱ²»ÓòÙ×÷´Ë×ֶΣ¬»á×Ô¶¯»ñµÃÊý¾ÝÖµ¡£ORACLEûÓÐ×Ô¶¯Ôö³¤µÄÊý¾ÝÀàÐÍ£¬ÐèÒª½¨Á¢Ò»¸ö×Ô¶¯Ôö³¤µÄÐòÁкţ¬²åÈë¼Ç¼ʱҪ°ÑÐòÁкŵÄÏÂÒ»¸öÖµ¸³ÓÚ´Ë×ֶΡ£
CREATE SEQUENCE ÐòÁкŵÄÃû³Æ (×îºÃÊDZíÃû+ÐòÁкűê¼Ç) INCREMENT BY 1 START WITH 1 MAXVALUE 99999 CYCLE NOCACHE;
ÆäÖÐ×î´óµÄÖµ°´×ֶεij¤¶ÈÀ´¶¨, Èç¹û¶¨ÒåµÄ×Ô¶¯Ôö³¤µÄÐòÁкŠNUMBER(6) , ×î´óֵΪ999999
INSERT Óï¾ä²åÈëÕâ¸ö×Ö¶ÎֵΪ: ÐòÁкŵÄÃû³Æ.NEXTVAL
2. µ¥ÒýºÅµÄ´¦Àí
MYSQLÀï¿ÉÒÔÓÃË«ÒýºÅ°üÆð×Ö·û´®£¬ORACLEÀïÖ»¿ÉÒÔÓõ¥ÒýºÅ°üÆð×Ö·û´®¡£ÔÚ²åÈëºÍÐÞ¸Ä×Ö·û´®Ç°±ØÐë×öµ¥ÒýºÅµÄÌæ»»£º°ÑËùÓгöÏÖµÄÒ»¸öµ¥ÒýºÅÌæ»»³ÉÁ½¸öµ¥ÒýºÅ¡£
3. ·Ò³µÄSQLÓï¾äµÄ´¦Àí
MYSQL
´¦Àí·Ò³µÄSQLÓï¾ä±È½Ï¼òµ¥£¬ÓÃLIMIT ¿ªÊ¼Î»ÖÃ, ¼Ç¼¸öÊý£»PHPÀﻹ¿ÉÒÔÓÃSEEK¶¨Î»µ½½á¹û¼¯µÄλÖá£ORACLE´¦Àí·Ò³µÄSQLÓï¾ä¾Í
±È½Ï·±ËöÁË¡£Ã¿¸ö½á¹û¼¯Ö»ÓÐÒ»¸öROWNUM×ֶαêÃ÷ËüµÄλÖÃ, ²¢ÇÒÖ»ÄÜÓÃROWNUM<100, ²»ÄÜÓÃROWNUM>80¡£
ÒÔÏÂÊǾ¹ý·ÖÎöºó½ÏºÃµÄÁ½ÖÖORACLE·Ò³SQLÓï¾ä( IDÊÇΨһ¹Ø¼ü×ÖµÄ×Ö¶ÎÃû )£º
Óï¾äÒ»£º
SELECT ID, [FIELD_NAME,...] from TABLE_NAME WHERE ID IN ( SELECT ID from (SELECT ROWNUM AS NUMROW, ID from TABLE_NAME WHERE Ìõ
¼þ1 ORDER BY Ìõ¼þ2) WHERE NUMROW > 80 AND NUMROW < 100 ) ORDER BY Ìõ¼þ
3;
Ïà¹ØÎĵµ£º
MYSQLÍü¼ÇROOTÃÜÂëºó£¿
ÐÞ¸ÄMySQLµÄµÇ¼ÉèÖãº
1.È¡ÏûȨÏÞ¹ÜÀí
±à¼ /mysql5.1/my.ini
ÔÚ[mysqld]µÄ¶ÎÖмÓÉÏÒ»¾ä£ºskip-grant-tables
ÀýÈ磺
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-name-resolve
skip-grant-tables
Ä¿µÄÊÇΪÁË£º
Ìø¹ýMySQLµÄ·ÃÎ ......
mysql ´ó¶ÔÏó´æÈ¡:
¡¡¡¡ÀàÐÍÒ»°ãÓ¦¸ÃÓÃmediumblod,
¡¡¡¡blobÖ»ÄÜ´æ2µÄ16´Î·½¸öbyte,
¡¡¡¡mediumblodÊÇ24´Î·½,
¡¡¡¡Ò»°ãÀ´Ëµ¹»ÓÃÁË.longblobÊÇ32´Î·½ÓÐЩ´ó.
¡¡¡¡MYSQLĬÈÏÅäÖÃÖ»ÄÜ´æ1M´óСµÄÎļþ,ÒªÐÞ¸ÄÅäÖÃ,WIN°æ±¾µÄÔÚmysql.iniÎļþÖÐ
¡¡¡¡ÐÞ¸Ämax_allowed_packet,net_buffer_lengthµÈ¼¸¸ö²ÎÊý,»òÖ±½ÓSET GLOBAL va ......
¹ØÓÚÐÞ¸ÄmysqlµÄrootÃÜÂëµÄ½â´ð£¨×ܽáƪ£©
ÕûÀíÁËÒÔÏÂËÄÖÖÔÚMySQLÖÐÐÞ¸ÄrootÃÜÂëµÄ·½·¨,Ö÷ÒªÊÇÓÐʱºò×Ô¼ºÓöµ½ÁËÕâ¸öÎÊÌâ²»ÖªµÀÔõô¸ãÁË£¬µ±È»Èç¹ûÄܸø¹ã´óµÄPHPer½â¾öÎÊÌâÒ²ÊÇÎÒµÄÈÙÐÒ°¡£¬ºÇºÇ¡£
·½·¨1£º ÓÃSET PASSWORDÃüÁî
¡¡¡¡mysql -u root
¡¡¡¡mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('n ......
MySQL³£ÓòÙ×÷»ù±¾²Ù×÷£¬ÒÔ϶¼ÊÇMySQL5.0ϲâÊÔͨ¹ýÊ×ÏÈ˵Ã÷Ï£¬¼ÇסÔÚÿ¸öÃüÁî½áÊøʱ¼ÓÉÏ£»£¨·ÖºÅ£©
1.µ¼³öÕû¸öÊý¾Ý¿â
mysqldump -u Óû§Ãû -p --default-character-set=latin1 Êý¾Ý¿âÃû > µ¼³öµÄÎļþÃû(Êý¾Ý¿âĬÈϱàÂëÊÇlatin1)
mysqldump -u wcnc -p smgp_apps_wcnc > wcnc.sql
2.µ¼³öÒ»¸ö±í
mysqldump -u Ó ......
MySQL Reference Manual for version 4.1.0-alpha.
¡¡ÒëÕßÐò
¡¡ÁÐÀàÐÍÓ뺯ÊýË÷Òý
6 MySQL ÓïÑԲο¼
6.1 ÓïÑԽṹ
6.1.1 ÎÄ×Ö£ºÔõôд×Ö·û´®ÓëÊý×Ö
6.1.1.1 ×Ö·û´®
6.1.1.2 Êý×Ö
6.1.1.3 Ê®Áù½øÖÆÖµ
......