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;
Ïà¹ØÎĵµ£º
¡¾51CTO.com¶À¼ÒÌظ塿Ãæ¶Ô¾ª»ÅµÄ¿Í»§ºÍ¹ã·ºÖÊÒɵÄýÌ壬Oracle¹Ù·½×î½üÖÕÓÚ³ö°ñ°²Ãñ£¬ÄDZãÊÇÒ»¸öÒÔ“SUN CUSTOMERS ,Oracle Plans To£º”Ϊ´ó±êÌâµÄ¹ã¸æ¡£Ö±Òë¹ýÀ´±ã¹ýÀ´¿ÉÖªµÀ£¬Oracle½«Òª¼Ó´óSPARCºÍSolarisµÄͶÈëÁË£¬¶ø´óÀÏ°å°£ÀïÉÒ²ÏòIBMÓ²¼þÏÂÁËÕ½Ê飬Éù³ÆOracle½«×îÖÕÓ®µÃÕⳡ¾ºÕù……
&n ......
ÓÉÓÚ°²×°MySQLµÄʱºò£¬ÊèºöûÓÐÑ¡Ôñµ×²ã±àÂ뷽ʽ£¬²ÉÓÃĬÈϵÄASCIIµÄ±àÂë¸ñʽ£¬ÓÚÊǽӶþÁ¬ÈýµÄÖÐÎÄת»»ÎÊÌâËæÖ®¶øÀ´£¬¾ÍÏëжÔØÁËÖØа²×°MYSQL£¬ÕâһжÔص¹ÊdzöÁËÎÊÌ⣬µ¼Ö°²×°µÄʱºò°²×°²»ÉÏ£¬ÔÚÍøÉÏÕÒÁËÒ»¸ö¶àСʱҲû½â¾ö¡£
ÖØװϵͳÓÀÔ¶ÊǸöºÃ°ì·¨£¬µ«ÓÐËϲ»¶Õâô×öѽ:(
ºóÀ´ÎÞÒâ·¢ÏÖÊÇжÔصÄʱºòûÓÐжÔØÍêÈ«µ¼Ö£ ......
ÍêÈ«°²×°°ü
http://mysql.isu.edu.tw/Downloads/MySQL-5.1/mysql-5.1.38-win32.msi
°üº¬ÁË°²×°MySQLËùÐèÒªµÄÈ«²¿ÎļþÓëÅäÖÃÏòµ¼ÒÔ¼°¿ÉÑ¡×é¼þ£¬Èç»ù×¼Ì×¼þºÍǶÈëʽ·þÎñÆ÷
»ù±¾°²×°°ü
http://mysql.isu.edu.tw/Downloads/MySQL-5.1/mysql-essential-5.1.38-win32.msi
Ö»°üº¬ÁË°²×°MySQLËùÐèÒªµÄ»ù±¾ÎļþÓëÅäÖÃÏòµ¼£¬µ«ÊÇ ......
MySQL³£ÓòÙ×÷»ù±¾²Ù×÷£¬ÒÔ϶¼ÊÇMySQL5.0ϲâÊÔͨ¹ýÊ×ÏÈ˵Ã÷Ï£¬¼ÇסÔÚÿ¸öÃüÁî½áÊøʱ¼ÓÉÏ£»£¨·ÖºÅ£©
1.µ¼³öÕû¸öÊý¾Ý¿â
mysqldump -u Óû§Ãû -p --default-character-set=latin1 Êý¾Ý¿âÃû > µ¼³öµÄÎļþÃû(Êý¾Ý¿âĬÈϱàÂëÊÇlatin1)
mysqldump -u wcnc -p smgp_apps_wcnc > wcnc.sql
2.µ¼³öÒ»¸ö±í
mysqldump -u Ó ......