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

Oracle´æ´¢¹ý³Ì·ÖÒ³

תÔØ
from: http://cid-4e5d038451e31a25.spaces.live.com/blog/cns!4E5D038451E31A25!140.entry
create or replace procedure P_QuerySplit(
      sqlscript varchar2,     --±íÃû/SQLÓï¾ä
      pageSize integer,       --ÿҳ¼Ç¼Êý
      pageIndex integer,      --µ±Ç°Ò³
      totalCount out number, --×ܼǼÊý
      totalPage out number, --×ÜÒ³Êý
      v_cur out sys_refcursor --·µ»ØÓαê
      ) is
/**
   * by chenjianxin 2008-5-3
   *
   */     
v_PageSize number;
v_PageIndex number;
v_SQL_Count varchar2(4000);
v_SQL varchar2(4000);
v_StartIndex number;
v_EndIndex number;
begin
v_PageSize:=pageSize;
if v_PageSize=0 then
    v_PageSize:=1;
end if;
--ͳ¼Æ¼Ç¼ÊýÁ¿
v_SQL_Count := 'select count(*) from ('|| sqlscript ||') a ';
execute immediate v_SQL_Count into totalCount;
--¼ÆËã×ÜÒ³Êý
totalPage:=CEIL(totalCount/v_PageSize);
--ÑéÖ¤Ò³ºÅ Èç¹ûÒ³ºÅ´óÓàÁË×î´óÒ³Êý£¬·µ»Ø×îºóÒ»Ò³
v_PageIndex:=pageIndex;
if v_PageIndex>totalPage then
    v_PageIndex:=totalPage;
end if;
--¼ÆË㿪ʼµÄIndexºÍ½áÊøµÄIndex
v_StartIndex:=(v_PageIndex-1)*v_PageSize+1;
v_EndIndex:=v_PageIndex*v_PageSize;
v_SQL:='SELECT /*+ FIRST_ROWS */* from (';
v_SQL:=v_SQL||' SELECT A.*, ROWNUM RN ';
v_SQL:=v_SQL||' from ('||sqlscript||') A ';
v_SQL:=v_SQL||' WHERE ROWNUM <= '||v_EndIndex;
v_SQL:=v_SQL||')WHERE RN >= '||v_StartIndex;
open v_cur for v_SQL;
end P_QuerySplit;
java´úÂ룺¡¡
public List listSplit(StringBuffer sbSQL,SplitPageInfo splitPageInfo)throws Exception{
      try {
          java.sql.CallableStatement proc = this.con.prepareCall(
    &n


Ïà¹ØÎĵµ£º

oracle ±í¿Õ¼ä²Ù×÷

oracle±í¿Õ¼ä²Ù×÷Ïê½â
  1
  2
  3×÷Õߣº   À´Ô´£º    ¸üÐÂÈÕÆÚ£º2006-01-04 
  5
  6 
  7½¨Á¢±í¿Õ¼ä
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

¡¾×ª¡¿ORACLE BLOB BFILE ÎļþµÄ¼Èë¼°¶ÁÈ¡

 Èç¹ûÄã½Ó´¥¹ýmysqlµÄ»°Ò»¶¨¶ÔmysqlµÄtextºÍblob²»»áÄ°Éú£¬ÔÚmysqlÖÐÊÇÖ±½Ó²Ù×÷textºÍblobµÄ¡£µ«ÊÇÔÚoracleÖУ¬Ëü°Ñlob×öΪһÖÖÌØÊâµÄ×ֶΣ¬²»ÄÜÖ±½Ó½øÐвÙ×÷--±ÈÈç²»ÄÜÖ±½Ó²åÈëµ½lob×Ö¶ÎÖУ¬Ò²²»ÄÜÓÃlike²éѯµÈµÈ¡£   
  ÕâÀïÊÇÎÒ±£´æµÄһƪÕâ·½ÃæµÄÎÄÕ£¬Ô­ÎÄ°á¹ýÀ´£¬ÓÉÓÚ±£´æµÄʱºòÖ»ÊÇÈ¡ÁËÒ»²¿·Ö£ ......

Oracle(listener.sqlnet.tnsnames)ÉèÖÃ


Ê×ÏÈÀ´ËµOracleµÄÍøÂç½á¹¹£¬Íù¸´ÔÓ´¦ËµÄܼÓÉϼÓÃÜ¡¢LDAPµÈµÈ¡£¡£ÕâÀï²»×öÌÖÂÛ£¬Öصã·ÅÔÚ»ù±¾µÄÍøÂç½á¹¹Ò²¾ÍÊÇÎÒÃÇ×î³£ÓõÄÕâÖÖÇé¿ö
¡¡¡¡
¡¡¡¡Èý¸öÅäÖÃÎļþ
¡¡¡¡
¡¡¡¡listener.ora¡¢sqlnet.ora¡¢tnsnames.ora £¬¶¼ÊÇ·ÅÔÚ$ORACLE_HOME\network\adminĿ¼Ï¡£
¡¡¡¡
¡¡¡¡Öصã:Èý¸öÎļþµÄ×÷ÓúÍʹÓÃ
¡¡¡¡
¡¡¡¡#------- ......

Oracle INTERVAL DAY TO SECONDÊý¾ÝÀàÐÍ

INTERVAL DAY TO SECONDÊý¾ÝÀàÐÍ
OracleÓï·¨:
INTERVAL '{ integer | integer time_expr | time_expr }'
{ { DAY | HOUR | MINUTE } [ ( leading_precision ) ]
| SECOND [ ( leading_precision [, fractional_seconds_precision ] ) ] }
[ TO { DAY | HOUR | MINUTE | SECOND [ (fractional_seconds_precision) ] } ......

ORACLEÖÐÈçºÎ²éÕÒÌض¨¶ÔÏóÖеÄÎı¾ÄÚÈÝ~

SQL> select dbms_metadata.get_ddl('PROCEDURE','PRO2','SCOTT') text from dual;
TEXT
----------------------------------------
CREATE OR REPLACE PROCEDURE "SCOTT"."P
RO2"
is
begin
dbms_output.put_line('wangpeng up');
end;
SQL> select dbms_metadata.get_ddl('PROCEDURE','PRO1','SCOTT') te ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ