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

Oracle ´æ´¢¹ý³Ì·µ»Ø½á¹û¼¯ÓÃ

Oracle ´æ´¢¹ý³Ì·µ»Ø½á¹û¼¯Óà ref cursor ʵÏÖ¡£ÊÔÑé²½ÖèÈçÏ£º
1. ½¨Á¢ ref cursor ÀàÐͺ͹ý³Ì
CREATE OR REPLACE PACKAGE types
AS
    TYPE ref_cursor IS REF CURSOR;
END;
/
CREATE TABLE STOCK_PRICES(
    RIC VARCHAR(6) PRIMARY KEY,
    PRICE NUMBER(7,2),
    UPDATED DATE );
/
CREATE OR REPLACE FUNCTION sp_get_stocks(v_price IN NUMBER)
    RETURN types.ref_cursor
AS
    stock_cursor types.ref_cursor;
BEGIN
    OPEN stock_cursor FOR
    SELECT ric,price,updated from stock_prices WHERE price < v_price;
    RETURN stock_cursor;
END;
2. Óà sqlplus ²âÊÔ¹ý³Ì
SQL> var results refcursor
SQL> exec :results := sp_get_stocks(20.0)
SQL> print results
3. ´Ó Java µ÷ÓÃ
import java.sql.*;
import java.io.*;
import oracle.jdbc.driver.*;
public class JDBCDemo {
    /**
    * Compile-time flag for deciding which query to use
    */
    private boolean useOracleQuery = true;
    /**
    * Class name of Oracle JDBC driver
    */
    private String driver = "oracle.jdbc.driver.OracleDriver";
    /**
    * Initial url fragment
    */
    private String url = "jdbc:oracle:thin:@";
    /**
    * Standard Oracle listener port
    */
    private String port = "1521";
    /**
    * Oracle style of calling a stored procedure
    */
    private String oracleQuery = "begin ? := sp_get_stocks(?); end;";
    /**
    * JDBC style of calling a stored procedure
    */
    private String genericQuery = "{ call ? := sp_get_stocks(?) }";
    /**


Ïà¹ØÎĵµ£º

oracle´Ó9.2.0.1Éý¼¶µ½9.2.0.8²½Öè

 ±³¾°£ºÔÚwindows 2003 serverÉϰ²×°ÁËOracle 9.2.0.1.0£¬ÏÖ´òË㽫ÆäÉý¼¶µ½9.2.0.8°æ±¾¡£
1.Éý¼¶oracle£¨administratorÓû§È¨ÏÞ£©
  (1)µ½metalinkÏÂÔØÉý¼¶Ñ¹Ëõ°ü£¬patchºÅΪ4547809£¬Ñ¹Ëõ°üÃû³ÆÎª p4547809_92080_WINNT.zip£¬for windows 32bit¡£
  (2)½âѹËõzip£¬Ï±߰üº¬Ò»¸öDisk1ºÍreadme.htmlÎļþ¡£ ......

Oracleɾ³ýÖØ¸´Êý¾Ý

ÔÚ¶ÔÊý¾Ý¿â½øÐвÙ×÷¹ý³ÌÖÐÎÒÃÇ¿ÉÄÜ»áÓöµ½ÕâÖÖÇé¿ö£¬±íÖеÄÊý¾Ý¿ÉÄÜÖØ¸´³öÏÖ£¬Ê¹ÎÒÃǶÔÊý¾Ý¿âµÄ²Ù×÷¹ý³ÌÖдøÀ´ºÜ¶àµÄ²»±ã£¬ÄÇôÔõôɾ³ýÕâÐ©ÖØ¸´Ã»ÓÐÓõÄÊý¾ÝÄØ?
¡¡¡¡Öظ´Êý¾Ýɾ³ý¼¼Êõ¿ÉÒÔÌṩ¸ü´óµÄ±¸·ÝÈÝÁ¿£¬ÊµÏÖ¸ü³¤Ê±¼äµÄÊý¾Ý±£Áô£¬»¹ÄÜʵÏÖ±¸·ÝÊý¾ÝµÄ³ÖÐøÑéÖ¤£¬Ìá¸ßÊý¾Ý»Ö¸´·þÎñˮƽ£¬·½±ãʵÏÖÊý¾ÝÈÝÔֵȡ£ ÖØ¸´µÄÊý¾ ......

oracleÖÐÎÄ×Ö¶ÎÌæ»»»Ø³µ

Q£ºÎҵıíÖÐÓÐÒ»¸ö×Ö¶ÎÊÇvarchar2(4000)   £¬ÆäÖд洢Á˲»ÉÙÖÐÎÄ£¬ÏÖÔÚÓÉÓÚÅŰæÐèÒª£¬ÎÒÏëÕÒ³öº¬Óлسµ·ûµÄ¼Ç¼ɾ³ý»Ø³µ·û£¬ÇëÎʸßÊÖSQLÓï·¨Ôõôд£¿
A£ºOracleÖлسµ·ûÊÇchr(10),¿ÉÒÔʹÓú¯Êýreplace(×Ö¶Î,chr(10),'')
È磺 update   x   set   a=replace(a,chr(10),'')¡£
º¯Êý£º
1.CHR
¸ø³öÕûÊ ......

OracleÊý¾Ý¿â¹ÜÀí½Å±¾ËµÃ÷

author£ºskate
time£º2010-05-25
OracleÊý¾Ý¿â¹ÜÀí½Å±¾ËµÃ÷
Oracle ÖеÄÊý¾Ý×ÖµäÊÇÊý¾Ý¿âÖеķdz£ÖØÒªµÄÒ»²¿·Ö£¬ÌṩÁËÏà¹ØÊý¾Ý¿âµÄÐÅÏ¢£¬ËüÊÇËùÓÐOracleÓû§£¨´ÓÓ¦ÓõÄ×îÖÕÓû§¡¢Ó¦ÓõÄÉè¼Æ¿ª·¢Õßµ½Êý¾Ý¿â¹ÜÀíÔ±£©µÄ·Ç³£ÖØÒªµÄÐÅÏ¢À´Ô´¡£Êý¾Ý×ÖµäµÄ´´½¨£¬ÊÇÔÚOracleÊý¾Ý¿â´´½¨Íê±Ïºó£¬ÔËÐÐһЩÏà¹ØµÄÊý¾Ý¿â¹ÜÀí½Å±¾À´Íê ......

oracle issue

Yes, sure ! You must be the local admin of this computer, and not a domain user.
Moreover, I'm afraid you cannot install it in a domain, maybe you should (just for testing purposes) try to install a standalone Windows system and try installing Oracle 10g on it.
You know, a RDBMS database server mu ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ