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

Oracle´´½¨´¥·¢Æ÷

½ñÌìÔÚ°Ù¶ÈÉÏËÑË÷ÁËÏÂoracleдµÄ´¥·¢Æ÷£¬¸Ð¾õ»¹¿ÉÒÔ¡£
¾ÍÊղؿ©¡£
Óû§±í£º´´½¨´¥·¢Æ÷֮ǰÊ×ÏÈÒª´´½¨ÐòÁÐ
Óû§±íÐòÁУº
create sequence users_seq;
Óû§±í´¥·¢Æ÷£º
create or replace trigger bifer_users_userid_pk
before insert
on users
for each row
begin
select users_seq.nextval into:new.userid from dual;
end;
/
ÉÌÆ·±í£º
ÉÌÆ·±íÐòÁУºcreate sequence product_seq;
ÉÌÆ·±í´¥·¢Æ÷£º
create or replace trigger bifer_product_itemid_pk
before insert
on product
for each row
begin
select product_seq.nextval into:new.itemid from dual;
end;
/
ÉÌÆ·Æ·ÅÆ±í£º
ÉÌÆ·Æ·ÅƱíÐòÁУºcreate sequence brand_seq;
ÉÌÆ·Æ·ÅÆ±í´¥·¢Æ÷£º
create or replace trigger bifer_brand_brandid_pk
before insert
on brand
for each row
begin
select brand_seq.nextval into:new.brandid from dual;
end;
/
ÉÌÆ·Àà±ð±í£º
ÉÌÆ·±íÐòÁУºcreate sequence class_seq;
ÉÌÆ·±í´¥·¢Æ÷£º
create or replace trigger bifer_class_classid_pk
before insert
on class
for each row
begin
select class_seq.nextval into:new.classid from dual;
end;
/
Ò»¸ö´¥·¢Æ÷Ö»ÄÜÓÃÓÚÒ»¸ö±í£¬¶øÒ»¸ö±í¿ÉÒÔÓÐ×î¶àÈý¸ö´¥·¢Æ÷£¬ÉÌÆ·Æ·ÅÆÀà±ð±íÊǸ´ºÏÖ÷¼üËùÒÔ¾ÍΪÉÌÆ·±í½¨ÁËÁ½¸ö´¥·¢Æ÷·Ö±´×÷ÓÃÓÚÿ¸öÖ÷¼ü
ÉÌÆ·Æ·ÅÆÀà±ð±í£º
ÉÌÆ·Æ·ÅÆÀà±ðÐòÁУºcreate sequence brand_class_seq;
ÉÌÆ·Æ·ÅÆÀà±ð´¥·¢Æ÷(brandid)£º
create or replace trigger brand_class_brandid_pk
before insert
on brand_class
for each row
begin
select brand_class_seq.nextval into:new.brandid from dual;
end;
/
ÉÌÆ·Æ·ÅÆÀà±ð´¥·¢Æ÷(classid)£º
create or replace trigger brand_class_classid_pk
before insert
on brand_class
for each row
begin
select brand_class_seq.nextval into:new.classid from dual;
end;
/
ÔÚoracleÖУ¬ÎªÁË·½±ã³£³£Óô¥·¢Æ÷¼°ÐòÁнáºÏÆðÀ´ÊµÏÖ     
ÏȽ¨±í¡¢ÔÙ½¨ÐòÁС¢È»ºóÊÇ´¥·¢Æ÷£¬×îºó²âÊÔ
=============================================                
                   &


Ïà¹ØÎĵµ£º

oracle²»¿É¸üеÄÊÔͼ

¹Ø¼ü´Ê£ºwith read only
×÷ÓãºÓÃÓÚÖ¸¶¨Ëù´´½¨µÄÊÔͼ²»¿ÉÒÔͨ¹ý±¾ÊÓͼ¸üбí
Ö´ÐÐÒ»ÏÂSQL£¬´´½¨±íT£¬ºÍÁ½¸öÊÔͼV1£¬V2£º
CREATE TABLE T(ID INTEGER);
CREATE VIEW V1 AS SELECT * from T;
CREATE VIEW V2 AS SELECT * from T WITH READ ONLY;
Ö´ÐÐSQL:
INSERT INTO V1 VALUES(1);
--------------------
1 row cre ......

Oracle EBS ÈçºÎÔ½áÖ®Ó¦¸¶(AP)¶ÔÕËÏê½â

Ó¦¸¶Ä£¿éµÄ¶àÊýÒµÎñ»ùÓڲɹººÍ¿â´æµÄ²Ù×÷£¬Òò´ËÓ¦¸¶Ä£¿éµÄÔ½áÓ¦¸ÃÔڲɹºÄ£¿éºÍ¿â´æÄ£¿éÔ½áºó²ÅÄܹرջá¼ÆÆÚ¡£
Ô½ᲽÖè
ÔÚÿ¸ö»á¼ÆÆÚÄ©£¬Ó¦¸¶Ä£¿éµÄÔ½áÓ¦×ñÑ­ÒÔÏÂÁ÷³Ì£º
1.¼ì²éÒµÎñÊÇ·ñÈ«²¿Â¼Èë;
2.¼ì²éÊÇ·ñÓÐδÑéÖ¤¡¢Ôݹҷ¢Æ±;
3.¸üе½ÆÚµÄÔ¶ÆÚ¸¶¿î״̬;
4.¼ì²éÓ¦¸¶ÒµÎñÊÇ·ñÉú³É·Ö¼;
5.Ó¦¸¶ÒµÎñ´«Ë͵½×ÜÕÊ;
6 ......

Çø±ðoracleµÄµ¥ÒýºÅºÍË«ÒýºÅ

      ¶ÔÓÚÎÒÃǸÕÈëÃŵÄoracle³õѧÕßÀ´Ëµ£¬Ñ§Ï°sqlÓïÑÔÊÇÈëÃŵĵÚÒ»²½£¬Ãæ¶Ôµ¥ÒýºÅºÍË«ÒýºÅ£¬ÎÒÃÇ¿ÉÄÜ»áÀ§»ó£¬Ê²Ã´Ê±ºòÓõ¥ÒýºÅ£¬Ê²Ã´Ê±ºòÓÃË«ÒýºÅÄØ£¿
    µ¥ÒýºÅ------  ֵΪ×Ö·ûºÍÈÕÆÚµÄʱºò Èç  'you'  '06-june'   »¹ÓÐʹÓÃÁ¬½Ó·û||£¬²åÈë¿Õ¸ñ||' ......

ÌáÈ¡Oracleµ±Ç°Óû§Ãû£¬»úÆ÷Ãû£¬IPµÄ·½·¨

select sysdate  µ±Ç°Ê±¼ä,
       sys.login_user  Êý¾Ý¿âÓû§,
       machine   µÇ¼»úÆ÷Ãû,
       SYS_CONTEXT('USERENV', 'IP_ADDRESS')   µÇ¼IP,
     &n ......

oracle ´æ´¢¹ý³ÌµÄ»ù±¾Óï·¨ ¼°×¢ÒâÊÂÏî

1.»ù±¾½á¹¹
CREATE OR REPLACE PROCEDURE ´æ´¢¹ý³ÌÃû×Ö
(
    ²ÎÊý1 IN NUMBER,
    ²ÎÊý2 IN NUMBER
) IS
±äÁ¿1 INTEGER :=0;
±äÁ¿2 DATE;
BEGIN
END ´æ´¢¹ý³ÌÃû×Ö
2.SELECT INTO STATEMENT
  ½«select²éѯµÄ½á¹û´æÈëµ½±äÁ¿ÖУ¬¿ÉÒÔͬʱ½«¶à¸öÁд洢¶à¸ö±äÁ¿ÖУ¬±ØÐëÓÐÒ»Ì ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ