oracleµÄ×óÓÒÁ¬½Ó
¶Ô×óÁ¬½Ó¡¢ÓÒÁ¬½ÓµÄÒÉ»óµÃµ½½â¾ö¡£
ÔÚOracle PL-SQLÖУ¬×óÁ¬½ÓºÍÓÒÁ¬½ÓÒÔÈçÏ·½Ê½À´ÊµÏÖ
²é¿´ÈçÏÂÓï¾ä£º
SELECT emp_name, dept_name
FORM Employee, Department
WHERE Employee.emp_deptid(+) = Department.deptid
´ËSQLʹÓÃÁËÓÒÁ¬½Ó£¬¼´“(+)”ËùÔÚλÖõÄÁíÒ»²àΪÁ¬½ÓµÄ·½Ïò£¬ÓÒÁ¬½Ó˵Ã÷µÈºÅÓÒ²àµÄËùÓмǼ¾ù»á±»ÏÔʾ£¬ÎÞÂÛÆäÔÚ×ó²àÊÇ·ñµÃµ½Æ¥Å䣬Ҳ¾ÍÊÇ˵ÉÏÀýÖÐÎÞÂۻ᲻»á³öÏÖij¸ö²¿ÃÅûÓÐÒ»¸öÔ±¹¤µÄÇé¿ö£¬Õâ¸ö²¿ÃŵÄÃû×Ö¶¼»áÔÚ²éѯ½á¹ûÖгöÏÖ¡£
·´Ö®£º
SELECT emp_name,
dept_name
FORM Employee,Department
WHERE Employee.emp_deptid = Department.deptid(+)
ÔòÊÇ×óÁ¬½Ó£¬ÎÞÂÛÕâ¸öÔ±¹¤ÓÐûÓÐÒ»¸öÄÜÔÚDepartment±íÖеõ½Æ¥ÅäµÄ²¿Ãźţ¬Õâ¸öÔ±¹¤µÄ¼Ç¼¶¼»á±»ÏÔʾ¡£
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/MyHoliday_2008/archive/2008/10/23/3131955.aspx
Ïà¹ØÎĵµ£º
Ó¦ÓÃϵͳ²»ÄÜÔËÐУ¬¸æ¾¯ÈÕÖ¾±¨¸æÁÙʱ±í¿Õ¼ä²»ÄÜÀ©Õ¹£¬¹À¼ÆÊÇÒµÎñsql´æÔÚ´óÁ¿ÅÅÐò£¬Ö»ÄÜÔö¼ÓÁÙʱ±í¿Õ¼ä»º½âÕâ¸öÎÊÌâ¡£
ÁíÍ⻹¿ÉÄÜÒªÇåÀíÁÙʱ¶ÎÖØÕûÁÙʱ±í¿Õ¼äÊͷſռ䣺
²é¿´Ò»ÏÂÈÏËÔÚÓÃÁÙʱ¶Î£º
SQL> SELECT /*+ rule */ se.username,se.sid,se.serial#,se.sql_address,se.machine,se.program,
su.tablespace,su.se ......
OracleÌṩÁ½ÖÖÑéÖ¤·½Ê½£¬Ò»ÖÖÊÇOSÑéÖ¤£¬ÁíÒ»ÖÖÃÜÂëÎļþÑéÖ¤·½Ê½£¬Èç¹ûÊǵÚÒ»ÖÖ·½Ê½ÓÃÒÔÏ·½·¨ÐÞ¸ÄÃÜÂ룺
¡¡¡¡sqlplus / as sysdba
¡¡¡¡alter user sys identified by ÐÂÃÜÂë;
¡¡¡¡alter user system identified by ÐÂÃÜÂë;
¡¡¡¡Èç¹ûÊǵڶþÖÖ·½·¨ÓÃÒÔÏ·½·¨ÐÞ¸ÄÃÜÂ룺
¡¡¡¡orapwd file=pwdxxx.ora password=ÄãÉ趨µÄÐ ......
JavaÊý¾Ý¿âÁ¬½Ó£¨JDBC£©APIÊÇһϵÁÐÄܹ»ÈÃJava±à³ÌÈËÔ±·ÃÎÊÊý¾Ý¿âµÄ½Ó¿Ú£¬¸÷¸ö¿ª·¢É̵Ľӿڲ¢²»ÍêÈ«Ïàͬ¡£ÔÚʹÓöàÄêµÄOracle¹«Ë¾µÄJDBCºó£¬ÎÒ»ýÀÛÁËÐí¶à¼¼ÇÉ£¬ÕâЩ¼¼ÇÉÄܹ»Ê¹ÎÒÃǸüºÃµØ·¢»ÓϵͳµÄÐÔÄܺÍʵÏÖ¸ü¶àµÄ¹¦ÄÜ¡£¡¡
¡¡¡¡1¡¢ÔÚ¿Í»§¶ËÈí¼þ¿ª·¢ÖÐʹÓÃThinÇý¶¯³ÌÐò¡¡
¡¡¡¡ÔÚ¿ª·¢JavaÈí¼þ·½Ã棬OracleµÄÊý¾Ý¿âÌṩÁËËÄ ......
¹ÜÀíÎļþ
1 ¹ÜÀí¿ØÖÆÎļþ
£¨1£©¸ÅÊö
¢Ù ¿ØÖÆÎļþÊÇOracleÊý¾Ý¿â×îÖØÒªµÄÎïÀíÎļþ¡£
¢Ú ÿ¸öOracleÊý¾Ý¿â¶¼±ØÐëÓÐÒ»¸ö¿ØÖÆÎļþ¡£
¢Û ÔÚ×°ÔØ£¨mount£©Êý¾Ý¿âʱ£¬Oracle»á¸ù¾Ý³õʼ»¯²ÎÊý¶¨Î»¿ØÖÆÎļþ¡£
¢Ü ÔÚÆô¶¯Àý³Ìʱ£¬Oracle»á¸ù¾Ý¿ØÖÆÎļþÔÚÀý³ÌºÍÊý¾Ý¿âÖ®¼ä½¨Á¢¹ØÁª¡£
¢Ý ´ò¿ªÊý¾Ý¿âʱ£¬Oracle»á¸ù¾Ý¿ØÖÆÎļþËù¼ÇÔ ......
ÔÚÍøÉÏËÑË÷Á˰ëÌ죬Ö÷ÒªÔÒòÊÇoci.dllÊÇ64λµÄ,¶øPL/SQL developerÖ»ÓÐ32λµÄ,ÔÚʹÓÃ64λoci.dllÎļþʱ³ö´í.
ÔÚÍøÉÏÕÒÁ˺ܶà×ÊÁÏ,×î·½±ãµÄ½â¾ö·½°¸ÈçÏÂ:
1.µ½oracle¹ÙÍøÏÂÔØOracle InstantClient,ÎÒϵÄÊÇinstantclient-basiclite-win32-10.2.0.4.zip,°ÑËü½âѹËõµ½
oracle°²×°Ä¿Â¼productÏÂ,ÆäÖл¹ÓÐÒ»¸öĿ¼Ϊ10.2.0. ......