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

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;
Óï¾ä¶þ£º
SELECT * from (( SELECT ROWNUM AS NUMROW, c.* from (select [FIELD_NAME,...] from TABLE_NAME WHERE Ìõ¼þ1 ORDER BY Ìõ¼þ2) c) WHERE NUMROW £¾ 80 AND NUMROW £¼ 100 ) ORDER BY Ìõ¼þ3;
4£® ³¤×Ö·û´®µÄ´¦Àí
³¤×Ö·û´®µÄ´¦ÀíORACLEÒ²ÓÐËüÌØÊâµÄµØ·½¡£INSERTºÍUPDATEʱ×î´ó¿É²Ù×÷µÄ×Ö·û´®³¤¶ÈСÓÚµÈÓÚ4000¸öµ¥×Ö½Ú, Èç¹ûÒª²åÈë¸ü³¤µÄ×Ö·û´®, Ç뿼ÂÇ×Ö¶ÎÓÃCLOBÀàÐÍ£¬·½·¨½èÓÃORACLEÀï×Ô´øµÄDBMS_LOB³ÌÐò°ü¡£²åÈëÐ޸ļǼǰһ¶¨Òª×ö½øÐзǿպͳ¤¶ÈÅжϣ¬²»ÄÜΪ¿ÕµÄ×Ö¶ÎÖµºÍ³¬³ö³¤¶È×Ö¶ÎÖµ¶¼Ó¦¸ÃÌá³ö¾¯¸æ,·µ»ØÉϴβÙ×÷¡£
5. ÈÕÆÚ×ֶεĴ¦Àí
MYSQLÈÕÆÚ×ֶηÖDATEºÍTIMEÁ½ÖÖ£¬ORACLEÈÕÆÚ×Ö¶ÎÖ»ÓÐDATE£¬°üº¬ÄêÔÂÈÕʱ·ÖÃ


Ïà¹ØÎĵµ£º

mysqlË÷Òý

ÆÕͨË÷Òý¡¢Î¨Ò»Ë÷ÒýºÍÖ÷Ë÷Òý
1. ÆÕͨË÷Òý
ÆÕͨË÷Òý(Óɹؼü×ÖKEY»òINDEX¶¨ÒåµÄË÷Òý)µÄΨһÈÎÎñÊǼӿì¶ÔÊý¾ÝµÄ·ÃÎÊËٶȡ£Òò´Ë£¬Ó¦¸ÃֻΪÄÇЩ×î¾­³£³öÏÖÔÚ²éѯÌõ¼þ(WHERE column = …)»òÅÅÐòÌõ¼þ(ORDER BY column)ÖеÄÊý¾ÝÁд´½¨Ë÷Òý¡£Ö»ÒªÓпÉÄÜ£¬¾ÍÓ¦¸ÃÑ¡ÔñÒ»¸öÊý¾Ý×îÕûÆë¡¢×î½ô´ÕµÄÊý¾ÝÁÐ(ÈçÒ»¸öÕûÊýÀàÐ͵ÄÊý¾ÝÁÐ)À ......

oracle¸ü¸Ä×Ö·û¼¯

ÐÞ¸Äoracle 10gµÄ×Ö·û¼¯
ÐÞ¸ÄÊý¾Ý¿â×Ö·û¼¯Îª£ºZHS16GBK
Ê×ÏÈÓÃscott&tiger&orclµÇ¼µ½sql/plus
²é¿´·þÎñÆ÷¶Ë×Ö·û¼¯
SQL > select * from
V$NLS_PARAMETERS;
Ð޸ģº
$sqlplus /nolog
SQL>conn / as sysdba
Èô
´ËʱÊý¾Ý¿â·þÎñÆ÷ÒÑÆô¶¯£¬ÔòÏÈÖ´ÐÐ SHUTDOWN IMMEDIATE Ãü
Áî¹Ø±ÕÊý¾Ý¿â·þÎñÆ÷£¬È»ºóÖ´ ......

Oracle³£ÓÃÓï¾ä

--ÈçºÎÓÃgrade±íµÄ×ÊÁÏÈ¥¸üÐÂusertable±íµÄ×ÊÁÏ£¨ÓйØÁªµÄ×Ö¶Îuserid£©
 update usertable u set u.grade =
 (select g.grade from grade g where g.userid = u.userid);
 
--ÈçºÎʹ²éѯ½á¹û×Ö¶ÎÉú³ÉÐòºÅ
select rownum, t.* from sm_t_pad_new t
--ÈçºÎ¿ìËÙ×öÒ»¸öºÍÔ­±íÒ»ÑùµÄ±¸·Ý±í
 create ......

Oracle & SUN£¬ÑϾþµÄÌôÕ½£¨Ò»£©

      ½ñÌì²Î¼ÓÁËOracle & SUNºÏ²¢ºóµÚÒ»´ÎÓëºÏ×÷»ï°é¼°¿Í»§µÄͨÆø»á¡£Õû¸ö»áÒé¸øÎҵĸоõÊÇ£ºOracleÐÛÐIJª²ª£¬SUNÒâÆø·ç·¢£¬¶øÎÒ×Ô¼º£¬ÐÄ»³ã·ã·¡£       OracleÓÐÁËSUN£¬ÄÇô´ÓÓ²¼þµ½Èí¼þOracleµÄ²úÆ·Ïß¾ÍÊ®·ÖÆ뱸ÁË¡£Oracle°ëÄêÇ°ÍƳö11gR2 for linux£¬½Ó×Åfor solar ......

PowerDesignerÉ趨MySQL×Ö¶ÎidentityÀàÐÍ

×ÔÔö³¤ÀàÐÍÔö¼Ó
1.Èç¹ûdbmsÊÇMsSql,ÔòÑ¡¶¨±íºó£¬database-> edit   current   dbms-> ³öÏÖDBMS   properties¶Ô»°¿ò£¬Ñ¡ÔñGeneralÒ³£¬×ó²àµÄÊ÷Ñ¡ÔñSQL   2000-> Profile-> Column-> Extended   Attributes   ÏÂÃæµÄExtIdentityIncrementÊDz½½ø ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ