oracle´æ´¢¹ý³Ì´úÂëʵÀý
1¡¢ÓÃÀ´²åÈë´óÁ¿²âÊÔÊý¾ÝµÄ´æ´¢¹ý³Ì
CREATE OR REPLACE PROCEDURE INSERTAMOUNTTEST
(
ST_NUM IN NUMBER,
ED_NUM IN NUMBER
)
IS
BEGIN
declare
i number;
begin
FOR i IN ST_NUM..ED_NUM LOOP
INSERT INTO tb values(i,i,'3','3','3',100,'0');
END LOOP;
end;
END;
ÔËÐУº
sql>execute INSERTAMOUNTTEST(1,45000) -- Ò»´Î²åÈë45000Ìõ²âÊÔÊý¾Ý
2¡¢´Ó´æ´¢¹ý³ÌÖзµ»ØÖµ
create or replace procedure spaddflowdate
(
varAppTypeId in varchar2,
varFlowId in varchar2,
DateLength in number,
ReturnValue out number --·µ»ØÖµ
)
is
begin
insert into td values(varAppTypeId,varFlowId,DateLength)
returning 1 into ReturnValue; --·µ»ØÖµ
commit;
exception
when others then
rollback;
end;
´æ´¢¹ý³ÌµÄÖ´ÐÐ
sql>variable testvalue number;
sql>execute spaddflowdate('v','v',2,:testvalue);
sql>print
¾Í¿ÉÒÔ¿´µ½Ö´Ðнá¹û
3¡¢ÓðüʵÏÖ´æ´¢¹ý³Ì·µ»ØÓα꣺
create or replace package test_p
as
type outList is ref cursor;
PROCEDURE getinfor(taxpayerList out outList);
end test_p;
/
create or replace package body test_p as PROCEDURE getinfor(taxpayerList out outList) is begin
OPEN taxpayerList FOR select * from
Ïà¹ØÎĵµ£º
ÎÊÌâÃèÊö£º
µ±Êý¾Ý¿âµÄ×Ö·û¼¯ÎªÖÐÎÄʱ£¬timestampÀàÐ͵Ä×Ö¶ÎΪÒÔϸñʽ£º
04-3ÔÂ -10 03.57.41.631000 ÏÂÎç
ÎÒÔÚÓÃJDOM½«Êý¾Ýµ¼³öΪXMLʱ£¬timestampÀàÐÍ×ֶεÄÖµ·´ÉúÁ˱仯£¬±ä³ÉÁËһϸñʽ
<CREATE_DATE>2010-3-4.15.57. 30. 505000000</CREATE_DATE>
½â¾ö·½°¸£º
ÔÚ²éѯ¸Ã×Ö¶ÎʱÊ×ÏÈÓÃto_char£¨£©º¯Êý½ ......
Ò».˵Ã÷
oracle µÄexp/impÃüÁîÓÃÓÚʵÏÖ¶ÔÊý¾Ý¿âµÄµ¼³ö/µ¼Èë²Ù×÷;
expÃüÁîÓÃÓÚ°ÑÊý¾Ý´ÓÔ¶³ÌÊý¾Ý¿â·þÎñÆ÷µ¼³öÖÁ±¾µØ,Éú³ÉdmpÎļþ;
impÃüÁîÓÃÓڰѱ¾µØµÄÊý¾Ý¿âdmpÎļþ´Ó±¾µØµ¼Èëµ½Ô¶³ÌµÄOracleÊý¾Ý¿âÖС£
¶þ.Óï·¨
¿ÉÒÔͨ¹ýÔÚÃüÁîÐÐÊäÈë imp help=y »ñÈ¡impµÄÓï·¨ÐÅÏ¢:
========= ......
·1979ÄêµÄÏļ¾£¬RSI·¢²¼ÁËOracleµÚ¶þ°æ
·1983Äê3Ô£¬RSI·¢²¼ÁËOracleµÚÈý°æ
´ÓÏÖÔÚÆðOracle²úÆ·ÓÐÁËÒ»¸ö¹Ø¼üµÄÌØÐÔ:¿ÉÒÆÖ²ÐÔ
·1984Äê10Ô£¬Oracle·¢²¼Á˵Ú4°æ²úÆ·
ÕâÒ»°æÔö¼ÓÁ˶ÁÒ»ÖÂÐÔÕâ¸öÖØÒªÌØÐÔ
·1985Ä꣬Oracle·¢²¼ÁË5.0°æ
Õâ¸ö°æ±¾ËãµÃÉÏÊÇOracleÊý¾Ý¿âµÄÎȶ¨°æ±¾¡£ÕâÒ²ÊÇÊ ......
ʵÀýÃû£¨instance_name£©£¬Ò»¸öÓÃÓÚÊý¾Ý¿âºÍ²Ù×÷ϵͳ֮¼äͨÐŵıêÖ¾£¬Êý¾Ý¿âºÍ²Ù×÷ϵͳ֮¼äÒª½øÐн»»¥ÓõľÍÊÇʵÀýÃû£¬ÊµÀýÃû¿ÉÒÔºÍÊý¾Ý¿âÃûÏàͬ£¬Ò»»áÔÙ˵Êý¾Ý¿âÃû£¬Ò»°ãÒ»¸öÊý¾Ý¿âÃû¶ÔÓ¦Ò»¸öʵÀýÃû£¬Ò»¶ÔÒ»¹Øϵ£¬µ«ÔÚoracleµÄ¼¯ÈºÓ¦ÓÃÖУ¬Êý¾Ý¿âÃûºÍʵÀýÃû¾ÍÊÇÒ»¶Ô¶àµÄ¹ØϵÁË¡£
¡¡¡¡²é¿´ÊµÀýÃû£ºsele ......