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

ORACLE ´¥·¢Æ÷

oracleѧϰ±Ê¼Ç_´¥·¢Æ÷
´¥·¢Æ÷
ÊÇÌض¨Ê¼þ³öÏÖµÄʱºò£¬×Ô¶¯Ö´ÐеĴúÂë¿é¡£ÀàËÆÓÚ´æ´¢¹ý³Ì£¬µ«ÊÇÓû§²»ÄÜÖ±½Óµ÷ÓÃËûÃÇ¡£
¹¦ÄÜ£º
1¡¢ ÔÊÐí/ÏÞÖƶԱíµÄÐÞ¸Ä
2¡¢ ×Ô¶¯Éú³ÉÅÉÉúÁУ¬±ÈÈç×ÔÔö×Ö¶Î
3¡¢ Ç¿ÖÆÊý¾ÝÒ»ÖÂÐÔ
4¡¢ ÌṩÉó¼ÆºÍÈÕÖ¾¼Ç¼
5¡¢ ·ÀÖ¹ÎÞЧµÄÊÂÎñ´¦Àí
6¡¢ ÆôÓø´ÔÓµÄÒµÎñÂß¼­
¿ªÊ¼
create trigger biufer_employees_department_id
 before insert or update
  of department_id
  on employees
 referencing old as old_value
     new as new_value
 for each row
 when (new_value.department_id<>80 )
begin
 :new_value.commission_pct :=0;
end;
/
´¥·¢Æ÷µÄ×é³É²¿·Ö£º
1¡¢ ´¥·¢Æ÷Ãû³Æ
2¡¢ ´¥·¢Óï¾ä
3¡¢ ´¥·¢Æ÷ÏÞÖÆ
4¡¢ ´¥·¢²Ù×÷
1¡¢ ´¥·¢Æ÷Ãû³Æ
create trigger biufer_employees_department_id
ÃüÃûÏ°¹ß£º
biufer£¨before insert update for each row£©
employees ±íÃû
department_id ÁÐÃû
2¡¢ ´¥·¢Óï¾ä
±ÈÈ磺
±í»òÊÓͼÉϵÄDMLÓï¾ä
DDLÓï¾ä
Êý¾Ý¿â¹Ø±Õ»òÆô¶¯,startup shutdown µÈµÈ
before insert or update
  of department_id
  on employees
 referencing old as old_value
     new as new_value
 for each row
˵Ã÷£º
1¡¢ ÎÞÂÛÊÇ·ñ¹æ¶¨ÁËdepartment_id £¬¶Ôemployees±í½øÐÐinsertµÄʱºò
2¡¢ ¶Ôemployees±íµÄdepartment_idÁнøÐÐupdateµÄʱºò
3¡¢ ´¥·¢Æ÷ÏÞÖÆ
when (new_value.department_id<>80 )
ÏÞÖƲ»ÊDZØÐëµÄ¡£´ËÀý±íʾÈç¹ûÁÐdepartment_id²»µÈÓÚ80µÄʱºò£¬´¥·¢Æ÷¾Í»áÖ´ÐС£
ÆäÖеÄnew_valueÊÇ´ú±í¸úÐÂÖ®ºóµÄÖµ¡£
4¡¢ ´¥·¢²Ù×÷
ÊÇ´¥·¢Æ÷µÄÖ÷Ìå
begin
 :new_value.commission_pct :=0;
end;
Ö÷ÌåºÜ¼òµ¥£¬¾ÍÊǽ«¸üкóµÄcommission_pctÁÐÖÃΪ0
´¥·¢£º
insert into employees(employee_id,
last_name,first_name,hire_date,job_id,email,department_id,salary,commission_pct )
values( 12345,’Chen’,’Donny’, sysdate, 12, ‘donny@hotmail.com’,60,10000,.25);
select commission_pct from employees where employee_id=12345;
´¥·¢Æ÷²»»á֪ͨÓû§£¬±ã¸Ä±äÁËÓû§µÄÊäÈëÖµ¡£
´¥·¢Æ÷ÀàÐÍ£º
1¡¢ Óï¾ä´¥·¢Æ÷
2¡¢ Ðд¥·¢Æ÷
3¡¢ INSTEAD OF ´¥·¢Æ÷
4¡¢ ϵͳÌõ¼þ´¥·¢Æ÷
5¡¢ Óû§Ê¼þ´¥·¢Æ÷
1¡¢ Óï¾ä´¥·


Ïà¹ØÎĵµ£º

ÈçºÎÔÚOracleÖн¨±í¸ñʱ¾ÍÖ¸¶¨Ö÷¼üºÍÍâ¼ü


´´½¨±íµÄÓï·¨
-´´½¨±í¸ñÓï·¨:
create table ±íÃû(
   ×Ö¶ÎÃû1  ×Ö¶ÎÀàÐÍ(³¤¶È) ÊÇ·ñΪ¿Õ,
   ×Ö¶ÎÃû2  ×Ö¶ÎÀàÐÍ       ÊÇ·ñΪ¿Õ
);
-Ôö¼ÓÖ÷¼ü
alter table ±íÃû add constraint Ö÷¼üÃû primary key (×Ö¶ÎÃû1);
-Ôö¼ÓÍâ¼ü:
alter table ±íÃû
  ......

OCPÈÏÖ¤¿¼ÊÔÖ¸ÄÏ£¨12£©£ºÅäÖÃOracle»¥Áª

1¡¢Oracle NetÓëͨÐÅЭÒé¼ò½é
OracleµÄÍøÂçÖ§³Ö±»ÏÞÖÆÓÚTCP¡¢ÃüÃû¹ÜµÀ£¨Named Pipes£¬¼òдSDP£©¡£ËùÓеIJÙ×÷ϵͳ¶¼¾ßÓÐÒ»¸ö±¾²Ù×÷ϵͳרÓеĽø³Ì¼äͨÐÅ£¨Inter-Process Communication£¬¼òдIPC£©Ð­Òé¡£
2¡¢½¨Á¢»á»°
ͨ¹ýÓû§½ø³Ì½¨Á¢Õë¶ÔʵÀýµÄ»á»°£¬¿ÉÒÔÖ´ÐУº
?[Copy to clipboard]View Code SQL
SQL> connect s ......

WIN7ÏÂÔõÑù×°Oracle 10g

      
WIN7µÄϵͳ½çÃæºÜƯÁÁ£¬Ê¹ÓÃÆðÀ´È·ÊµºÜ²»´í£¬¿ÉÊÇÈ´Ò²¸øÎÒµÄѧϰ´øÀ´¹ý²»ÉÙÂé·³¡£ÓÈÆäÊÇÕâ´Î×°Oracle£¬±ðÈËÓõÄÊÇXPµÄϵͳºÜÈÝÒ×¾Í×°ÉÏÁ˵ģ¬¿ÉÊÇÎÒÈ´ÔõôҲװ²»ÉÏ¡£ÎªÁËÈÃͬÑùϲ°®WIN7µÄÅóÓÑÉÙ×ßЩÍä·£¬ÏÂÃæ¾Í½éÉÜÒ»ÏÂÔÚwin7ÉÏ°²×°Oracle10gµÄ·½·¨°É£¬ÄÇ¿ÉÊDZ¾ÈËÓÃÁË8Ììʱ¼ä£¬²»Í ......

Oracle Sql ÐÔÄÜÓÅ»¯

1£©²»Öª´ó¼ÒÊÇ·ñϲ»¶Ê¹ÓÑNOT IN’ÕâÑùµÄ²Ù×÷£¬Èç¹ûÊÇ£¬ÄǾ¡Á¿Ê¹ÓÃ(NOT) EXISTS Ìæ´ú
2£©ÔÚº£Á¿²éѯʱ¾¡Á¿ÉÙÓøñʽת»»¡£
3£©²éѯº£Á¿Êý¾ÝÊÇ£¬¿ÉÒÔʹÓÃoptimizer['ɔptimaizə] hints£¬ÀýÈç/*+ORDERED */
¾¡Á¿ÉÙÓÃIN²Ù×÷·û£¬»ù±¾ÉÏËùÓеÄIN²Ù×÷·û¶¼¿ÉÒÔÓÃEXISTS´úÌæ¡£
²»ÓÃNOT IN²Ù×÷·û£¬¿ÉÒÔ ......

OracleÖÐʹÓÃIMP DosÃüÁî µ¼ÈëDICÊý¾Ý¿â±¸·Ý¹ý³Ì

OracleÖÐʹÓÃIMP DosÃüÁî µ¼ÈëDICÊý¾Ý¿â±¸·Ý¹ý³Ì
 
1.ʹÓþßÓн¨Á¢±í¿Õ¼äºÍÓû§È¨ÏÞµÄÓû§µÇ¼Oracle£»
2.½¨Á¢ÐèÒªµÄ±í¿Õ¼ä£»
3.½¨Á¢ÐèÒªµÄÓû§£¨Óû§Ãû£¬ÃÜÂ룬ĬÈϱí¿Õ¼ä£¬ÁÙʱ±í¿Õ¼ä£¬È¨ÏÞ£©
4.´ò¿ªDOS´°¿Ú£¬ÔÚÃüÁîÐÐÖÐÊäÈëIMP£»
5.ÓõÚÈý²½Öн¨Á¢ºÃµÄÓû§µÇ¼Êý¾Ý¿â£»
6.ÊäÈëDICÎļþµÄÍêȫ·¾¶£¬°´ÕÕÌáʾѡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ