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

ORACLE PL/SQL ¼Ç¼(Record)ѧϰ±Ê¼Ç(Ò»)

ÔÚPL/SQL³ÌÐòÉè¼ÆÖУ¬ÓÐÈýÖÖ¶¨Òå¼Ç¼ÀàÐ͵ķ½·¨£ºÒ»ÖÖÊÇʹÓÃ%ROWTYPEÊôÐÔ£»ÁíÒ»ÖÖÊÇÔÚPL/SQL³ÌÐòµÄÉùÃ÷²¿·ÖÏÔʾ¶¨Òå¼Ç¼ÀàÐÍ£»×îºóÒ»ÖÖ·½·¨Êǽ«¼Ç¼ÀàÐͶ¨ÒåΪÊý¾Ý¿â½á¹¹»ò¶ÔÏóÀàÐÍ¡£
ÎÒÏȼòµ¥µÄ½éÉÜÒ»¸öÏÂÃæÒªÓõ½µÄ±íµÄ½á¹¹£¨ºÚÌå±êÃ÷µÄ×Ö¶ÎΪÖ÷¼ü£©£º
INDIVIDUALS±í
 
INDIVIDUAL ID
FIRST NAME
MIDDLE_INITIAL
LAST_NAME
 
ADDRESSES±í
 
ADDRESS ID
INDIVIDUAL ID
STREET_ADDRESS1
STREET_ADDRESS1
STREET_ADDRESS1
CITY
STATE
POSTAL_CODE
COUNTRY_CODE
 
TELEPHONES±í
 
TELEPHONE ID
INDIVIDUAL ID
ADDRESS_ID
TELEPHONE_TYPE
TELEPHONE_NUMBER
 
Ò»¡¢¼Ç¼ÀàÐ͵Ķ¨ÒåºÍʹÓÃ
 
1¡¢Ê¹ÓÃ%ROWTYPEÊôÐÔÒþʽ¶¨Òå¼Ç¼ÀàÐÍ
¿ÉÒÔʹÓÃ%ROWTYPEÊôÐÔÒýÓÃPL/SQLÓαꡢÊý¾Ý¿âÖÐµÄ±í¡¢¶ÔÏó»òÊÓͼ£¬%ROWTYPEÊôÐԼ̳ÐÁËÕâЩ¶ÔÏóµÄÐж¨Òå¡£ÔÚÓÃ%ROWTYPEÊôÐÔ¶¨ÒåµÄÐÐÖУ¬ËùÓÐ×ֶζ¼ÊǸù¾ÝÓëÖ®Ïà¹ØµÄ±íÁеÄÊý¾ÝÀàÐÍÒþʽ¶¨ÒåµÄ¡£×Ö¶ÎÃû³ÆÒ²¾ÍÊDZíÖеÄÁÐÃû¡£
ͨ¹ýʹÓõãÓï·¨¸ô¿ª¼Ç¼±äÁ¿Ãû³ÆºÍ¼Ç¼µÄ×Ö¶ÎÃû£¬ÎÒÃǾͿÉÒÔ·Ö±ð·ÃÎʼǼµÄ¸÷¸ö×ֶΡ£
ÈçÏÂÀýËùʾ£º
DECLARE
-- Define a variable with an implicit record type.
individual individuals%ROWTYPE;
BEGIN
-- Initialize the field values for the record.
individual.individual_id := 1;
individual.first_name := 'John';
individual.middle_initial := 'D';
individual.last_name := 'Rockefeller';
-- Insert the values into the target object.
INSERT
INTO individuals
VALUES
(individual.individual_id
,individual.first_name
,individual.middle_initial
,individual.last_name);
-- Commit the record.
COMMIT;
END;
/   
2¡¢ÏÔʽµØ½«¼Ç¼ÀàÐͶ¨ÒåΪPL/SQL½á¹¹
Ò²¿ÉÒÔÔÚPL/SQL³ÌÐòµÄÉùÃ÷²¿·Ö£¬Í¨¹ý¶¨ÒåÒ»¸ö¼Ç¼ÀàÐ͵ķ½Ê½£¬ÏÔʽµÄ´´½¨Ò»¸ö¼Ç¼ÀàÐÍ¡£¿ÉÒÔÏÔʽµØ¼üÈë±äÁ¿Ãû³ÆÀ´¶¨Òå¼Ç¼ÀàÐ͵ıäÁ¿£¬Ò²¿ÉÒÔʹÓÃ%TYPEÊôÐÔ¶¨Òå±äÁ¿¡£
ÈçÏÂÀýËùʾ£º
DECLARE
-- Define a record type.
TYPE individual_record IS RECORD
(individual_id INTEGER
,first_name VARCHAR2(30 CHAR)
,middle_initial individuals.middle_initial%TYPE
,last_name VARCHAR2(30 CHAR));
-- Define a variable of the record type.
indi


Ïà¹ØÎĵµ£º

ORACLE·ÖÇø±íµÄ²Ù×÷Ó¦ÓÃ

ORACLE·ÖÇø±íµÄ²Ù×÷Ó¦ÓÃ
ORACLE·ÖÇø±íµÄ²Ù×÷Ó¦ÓÃ
ÕªÒª£ºÔÚ´óÁ¿ÒµÎñÊý¾Ý´¦ÀíµÄÏîÄ¿ÖУ¬¿ÉÒÔ¿¼ÂÇʹÓ÷ÖÇø±íÀ´Ìá¸ßÓ¦ÓÃϵͳµÄÐÔÄܲ¢·½±ãÊý¾Ý¹ÜÀí£¬±¾ÎÄÏêϸ½éÉÜÁË·ÖÇø±íµÄʹÓᣡ¡¡¡ ÔÚ´óÐ͵ÄÆóÒµÓ¦ÓûòÆóÒµ¼¶µÄÊý¾Ý¿âÓ¦ÓÃÖУ¬Òª´¦ÀíµÄÊý¾ÝÁ¿Í¨³£¿ÉÒÔ´ïµ½¼¸Ê®µ½¼¸°ÙGB£¬ÓеÄÉõÖÁ¿ÉÒÔµ½TB¼¶¡£ËäÈ»´æ´¢½éÖʺÍÊý¾Ý´¦Àí¼¼ÊõµÄ·¢Õ ......

OracleºÍTomcat¶Ë¿Ú³åÍ»

OracleºÍTomcat¶Ë¿Ú³åÍ»
Ô­Òò:
    Oracle 9i¿ªÊ¼£¬´´½¨Êý¾Ý¿âʱĬÈÏ°üº¬ÁËXDBÌØÐÔ¡£Ò»µ©Æô¶¯ÁËÊý¾Ý¿âºÍListener£¬Oracle XDBµÄhttp·þÎñ¾ÍÕ¼ÓÃ8080¶Ë¿Ú£¬¸ÕºÃºÍJBoss¡¢TomcatµÈĬÈ϶˿ڳåÍ»¡£
½â¾ö·½·¨
 1¡¢¸Ä¶¯tomcat¶Ë¿Ú£¬
´ò¿ªD:\Tomcat5\conf\server.xml£¬²éÕÒÈçÏÂÎı¾Î»Öãº
<!-- Def ......

oracle Ë÷Òý

2009-07-16 10:59
Ë÷Òý´´½¨²ßÂÔ
1.µ¼ÈëÊý¾ÝºóÔÙ´´½¨Ë÷Òý
2.²»ÐèҪΪºÜСµÄ±í´´½¨Ë÷Òý
3.¶ÔÓÚÈ¡Öµ·¶Î§ºÜСµÄ×ֶΣ¨±ÈÈçÐÔ±ð×ֶΣ©Ó¦µ±½¨Á¢Î»Í¼Ë÷Òý
4.ÏÞÖƱíÖеÄË÷ÒýµÄÊýÄ¿
5.ΪË÷ÒýÉèÖúÏÊʵÄPCTFREEÖµ
6.´æ´¢Ë÷ÒýµÄ±í¿Õ¼ä×îºÃµ¥¶ÀÉ趨
´´½¨²»Î¨Ò»Ë÷Òý
create index emp_ename on employees(ename)
table ......

oracle °ü

 package¾ÍÊÇÓÃÀ´·â×°¹ý³Ì£¬º¯ÊýÓõġ£
Ò»¸öpackage¿ÉÒÔ´æ·Å¶à¸ö¹ý³Ì£¬º¯Êý¡£
µ÷ÓÃÊÇ£º
°üÃû.¹ý³ÌÃû1
°üÃû.¹ý³ÌÃû2
http://hank4ever.javaeye.com/blog/472336
°ü (package)
¡¡¡¡(1)°üµÄÒâÒå
¡¡¡¡pl/sqlΪÁËÂú×ã³ÌÐòÄ£¿é»¯µÄÐèÒª,³ýÁË¿é(block)ºÍ×Ó³ÌÐò½á¹¹Íâ,»¹ÒýÈëÁË°üµÄ¹¹Ôì¡£
¡¡¡¡°üÊÇÒ»ÖÖÊý¾Ý¿â¶ÔÏó,½«Â ......

Flash »á±íÊý¾Ý Ö®oracle 10g

½çÃ濪·¢ÈËÔ±±¨ÓкܶàÖظ´Êý¾ÝÔÚÓû§È¨ÏÞ±í¡£È»ºóÎÒɾ³ýÁ˱íÊý¾Ýdelete ·½Ê½£¬ÐÞ¸ÄÁ˶ÔÓ¦µÄ´æ´¢¹ý³Ìʹ֮²»Öظ´£¡
ºóÀ´·¢ÏÖ ÖØÐÂÀ­»ØµÄÊý¾ÝûȨÏÞ¡£ Ö»ºÃÉÁ»Øµ½½ñÌìÁ賿ÁË£¡
SQL> ALTER TABLE BA.T_POWER_ADMIN ENABLE ROW MOVEMENT;
 
Table altered
 
SQL> flashback table ba.t_Power_Admin to tim ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ