ORACLE Óë mysql µÄÇø±ð
1.ÔÚORACLEÖÐÓÃselect * from all_usersÏÔʾËùÓеÄÓû§£¬¶øÔÚMYSQLÖÐÏÔʾËùÓÐÊý¾Ý¿âµÄÃüÁîÊÇshow
databases¡£¶ÔÓÚÎÒµÄÀí½â£¬ORACLEÏîÄ¿À´ËµÒ»¸öÏîÄ¿¾ÍÓ¦¸ÃÓÐÒ»¸öÓû§ºÍÆä¶ÔÓ¦µÄ±í¿Õ¼ä£¬¶øMYSQLÏîÄ¿ÖÐÒ²Ó¦¸ÃÓиöÓû§ºÍÒ»¸ö¿â¡£ÔÚ
ORACLE(db2Ò²Ò»Ñù)Öбí¿Õ¼äÊÇÎļþϵͳÖеÄÎïÀíÈÝÆ÷µÄÂß¼±íʾ£¬ÊÓͼ¡¢´¥·¢Æ÷ºÍ´æ´¢¹ý³ÌÒ²¿ÉÒÔ±£´æÔÚ±í¿Õ¼äÖС£¶øMYSQL²¢Ã»ÓÐʹÓñí¿Õ¼äÀ´
½øÐйÜÀí¡£
2.²éѯµ±Ç°ËùÓÐµÄ±í¡£ORACLE£º select * from tab£¬MYSQL£ºshow tables¡£
3.¸Ä±äÁ¬½ÓÓû§(¿â)¡£ORACLE£ºconn Óû§Ãû/ÃÜÂë@Ö÷»ú×Ö·û´®£¬MYSQL£ºuse ¿âÃû¡£
4.ÏÔʾµ±Ç°Á¬½ÓÓû§(¿â)¡£ORACLE£ºshow user£¬MYSQL£ºconnect¡£
5.Ö´ÐÐÍⲿ½Å±¾ÃüÁî¡£ORACLE£º@a.sql£¬MYSQL£ºsource a.sql¡£
±È°æ±¾
Personal Oracle 10
mysql 5.1
ĬÈÏ°²×°Ä¿Â¼
¿ÉÑ¡Ôñ
C:\program files\MYSQL
¸÷ÖÖʵÓóÌÐòËùÔÚĿ¼
¿ÉÑ¡Ôñ
C:\program files\\BIN
¿ØÖÆ̨¹¤¾ß
SVRMGR.EXE
SVRMGR23.EXE
mysqladmin.exe
Êý¾Ý¿âÆô¶¯³ÌÐò
0start73.exe screen
mysqld-shareware.exe
¹Ø±ÕÊý¾Ý¿âÃüÁî
ostop73.exe
mysqladmin.exe -u root shutdown
¿Í»§³ÌÐò
SQL*Plus
mysql
Æô¶¯ÃüÁî
c:\orawin95\bin\sqlplus.exe
c:\mysql\bin\mysql.exe
´øÓû§Æô¶¯·½Ê½
£¨Ö±½ÓÁ¬¿â·½Ê½£©
c:\orawin95\bin\sqlplus.exe
system/manager@TNS
c:\mysql\bin\mysql.exe test
c:\mysql\bin\mysql.exe
-u root test
°²×°ºóϵͳĬÈÏÓû§£¨¿â£©
sys
system
scott
mysql
test
ÏÔʾËùÓÐÓû§£¨¿â£©
SQL >select * from all_users;
C:\mysql\bin>mysqlshow
C:\mysql\bin>mysqlshow
--status
mysql> show databases;
Í˳öÃüÁî
SQL> exit
SQL> quit
mysql> exit
mysql> quit
¸Ä±ä
Ïà¹ØÎĵµ£º
MySQL³£ÓõĴ洢ÒýÇæΪMyISAM¡¢InnoDB¡¢MEMORY¡¢MERGE£¬ÆäÖÐInnoDBÌṩÊÂÎñ°²È«±í£¬ÆäËû´æ´¢ÒýÇ涼ÊÇ·ÇÊÂÎñ°²È«±í¡£
MyISAMÊÇMySQLµÄĬÈÏ´æ´¢ÒýÇæ¡£MyISAM²»Ö§³ÖÊÂÎñ¡¢Ò²²»Ö§³ÖÍâ¼ü£¬µ«Æä·ÃÎÊËٶȿ죬¶ÔÊÂÎñÍêÕûÐÔûÓÐÒªÇó¡£
InnoDB´æ´¢ÒýÇæÌṩÁ˾ßÓÐÌá½»¡¢»Ø¹öºÍ±ÀÀ£»Ö¸´ÄÜÁ¦µÄÊÂÎñ°²È«¡£µ«ÊDZÈÆðMyISAM´æ´ ......
×î´óµÄÎïÆ·ºÅÊÇʲô£¿
SELECT MAX(article) AS article from shop;
ÈÎÎñ£ºÕÒ³ö×î¹óÎïÆ·µÄ±àºÅ¡¢ÏúÊÛÉ̺ͼ۸ñ¡£
ÕâºÜÈÝÒ×ÓÃÒ»¸ö×Ó²éѯ×öµ½£º
SELECT article, dealer, price
from shop
WHERE price=(SELECT MAX(price) from shop);
ÁíÒ»¸ö½â¾ö·½°¸ÊÇ°´¼Û¸ñ½µÐòÅÅÐòËùÓÐÐв¢ÓÃMySQLÌض¨LIMIT×Ó¾äÖ» ......
½ñÌì×ö¸ß¼¶¸´ÖÆʵÑ飬ִÐе½Ìí¼Ómaster siteʱÓöµ½´ËÎÊÌ⣬ÉÏÍøËÑÁËËÑ£¬ÓÐÈçϼ¸ÖÖÒâ¼û£º
1.ÊÚȨ¹ý³Ì²»¶Ô——Çë×Ðϸ°´ÕÕÎĵµÉϵÄ˵Ã÷½øÐС£
2.°æ±¾ÎÊÌâ——¿É²é¿´v$optionÊÓͼÖÐÏà¹Ø²ÎÊýÊÇ·ñΪtrue¡£
3.°æ±¾ÎÊÌâ——ÓиöתÌùmetalinkµÄÎÄÕÂÉÏ˵ֻÓÐoracleÆóÒµ°æÖ§³Ö¸ß¼¶¸´ÖÆ¡£
¶¼Ã»Óн⾠......
Æô¶¯ÓëÅäÖòÎÊý ¸ü¸ÄϵͳԪÊý¾ÝºÍ²ÎÊýÅäÖà ¶¯Ì¬ÊÓͼ ´æ´¢µÄÎïÀíºÍÂß¼½á¹¹ Æô¶¯ºÍ¹Ø±Õ
topÆô¶¯ÓëÅäÖòÎÊý
ÔÚSQL Server°²×°µÄʱºò£¬Í¬Ê±Ò²»áÍùWindows×¢²á±íÀïÃæÌí¼ÓһЩ¼Ç¼£¬ÕâЩע²á±í¼üÖµÖ¸¶¨ÁËʵÀýËùÐèÒªµÄ¸÷ÖÖ²ÎÊý¡£±ÈÈ磬ÓеÄ×¢²á±í¼üÖµÖ¸¶¨ÁË´íÎóÈÕÖ¾µÄ±£´æĿ¼£¬ÁíÍâµÄÖ¸¶¨ÁËĬÈϵı¸·ÝĿ¼µÈµÈ¡£SQL ServerÔÚÔ ......
MysqlÔÚĬÈÏÇé¿öϽ¨Á¢±íµÄ×Ö·û±àÂëÊÇlatin1£¬ËùÒÔÔÚ²åÈëÖÐÎÄʱ»á³ö´í¡£
eg£º
1¡¢²é¿´±í½¨Á¢µÄsqlÔ´Â룺
1: sqlÃüÁshow create table users
2:
3: ½á¹û£º
4: CREATE TABLE `users` (
5: `userID` int(10) unsigned NOT NULL AUTO_INCREMENT,
6: `userName` varchar(4 ......