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

ORACLE PL/SQL ¼Ç¼(Record)ѧϰ±Ê¼Ç(¶þ)

¶þ¡¢ÒÔÐβεÄÐÎʽ¶¨ÒåºÍʹÓüǼ¡¢¶ÔÏóÀàÐÍ
ÔÚÓÃ×÷ÐÎʽ²ÎÊýʱ£¬¼Ç¼ÀàÐͺͶÔÏóÀàÐÍÓкܶàÏà֮ͬ´¦¡£ÔÚ½«ËüÃÇ×÷ΪÓαꡢº¯Êý»ò¹ý³ÌµÄÐÎʽ²ÎÊýÒÔÇ°£¬ÊÂÏȶ¼±ØÐ붨ÒåÒ»¸ö¼Ç¼ÀàÐÍ»òÕ߶ÔÏóÀàÐÍ¡£
ÈçÏÂÀýËùʾ£º
 
¼Ç¼
DECLARE

-- Define a record type.
TYPE individual_record IS RECORD
(individual_id INTEGER
,first_name VARCHAR2(30 CHAR)
,middle_initial VARCHAR2(1 CHAR)
,last_name VARCHAR2(30 CHAR));

-- Define a record type.
TYPE address_record IS RECORD
(address_id INTEGER
,individual_id INTEGER
,street_address1 VARCHAR2(30 CHAR)
,street_address2 VARCHAR2(30 CHAR)
,street_address3 VARCHAR2(30 CHAR)
,city VARCHAR2(20 CHAR)
,state VARCHAR2(20 CHAR)
,postal_code VARCHAR2(20 CHAR)
,country_code VARCHAR2(10 CHAR));
-- Define a record type of two user defined record type variables.
TYPE individual_address_record IS RECORD
(individual INDIVIDUAL_RECORD
,address ADDRESS_RECORD);

-- Define a variable of a user defined compound record type.
individual_address INDIVIDUAL_ADDRESS_RECORD;

-- Define a local procedure to manage addresses inserts.
PROCEDURE insert_address
(address_in ADDRESS_RECORD) IS
BEGIN
-- Insert the values into the target object.
INSERT
INTO addresses
VALUES
(address_in.address_id
,address_in.individual_id
,address_in.street_address1
,address_in.street_address2
,address_in.street_address3
,address_in.city
,address_in.state
,address_in.postal_code
,address_in.country_code);
END insert_address;
-- Define a local procedure to manage addresses inserts.
PROCEDURE insert_individual
(individual_in INDIVIDUAL_RECORD) IS
BEGIN
-- Insert the values into the table.
INSERT
INTO individuals
VALUES
(individual_in.individual_id
,individual_in.first_name
,individual_in.middle_initial
,individual_in.last_


Ïà¹ØÎĵµ£º

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

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

oracle °ü

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

Oracle JOB Ó÷¨Ð¡½á

Ò»¡¢ÉèÖóõʼ»¯²ÎÊý job_queue_processes
¡¡¡¡sql> alter system set job_queue_processes=n;£¨n>0£©
¡¡¡¡job_queue_processes×î´óֵΪ1000
¡¡¡¡
¡¡¡¡²é¿´job queue ºǫ́½ø³Ì
¡¡¡¡sql>select name,description from v$bgprocess;
¡¡¡¡
¡¡¡¡¶þ£¬dbms_job package Ó÷¨½éÉÜ
¡¡¡¡°üº¬ÒÔÏÂ×Ó¹ý³Ì£º
¡¡¡¡
¡¡ ......

Oracle³£ÓÃSQLÓï¾ä(PL/SQL developer¹¤¾ßϵÄ)

 ½¨±í
create table users(
id number(4) primary key,
username varchar2(10),
password varchar2(10)
)
²éѯ±í²¢½âËø±í(¼´¿ÉÒÔµã»÷ÊäÈë¿òÏÂÃæµÄ"Ëø"ͼ±ê¹¤¾ß, ¼´"Edit data")
select * from users for update
ɾ³ý±íÖжàÓàµÄÁÐ
alter table mobilephone drop column mobiletype
תÔØ
------------------- ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ