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

´«ÖDz¥¿ÍjavaÅàѵORACLE×ܽá(3)


 
ORACLEµÄѧϰÒѾ­¸æÒ»¶Î茖£¬½ñÌìÒѾ­¿ªÊ¼HIBERNATEµÄѧϰ£¬×ÜÌå¸Ð¾õͦÁ¼ºÃµÄ£¬ËäÈ»ºÜ¶àµÄ֪ʶ²»ÄܼÇס£¬µ«ÊÇÔÚʹÓõÄʱºòÄܹ»Ñ¸ËÙµÄÕÒ¶Ô·½·¨À´½â¾öÏàÓ¦µÄÎÊÌ⣬ֻҪÇÚ¼ÓÁ·Ï°£¬¾Í¿ÉÒÔ¼Çס¡£Ö»²»¹ý£¬Ê±¼äÓÐ珢£¬HIBERNATEµÄ¿Î³ÌÒ²Ö»ÓÐÈýÌìµÄʱ¼ä£¬ËùÒÔÔÚÕâÆÚ¼äÎÒµÄÈÎÎñÊǾ¡Á¿ÎüÒý£¬ÔÚ»¨·Å¼ÙµÄʱºòÀ´¸´Ï°¡£½ñÌì°ÑORACLE×îºóµÄµÄ±Ê¼ÇÕûÀí¡£
ÎÒÃÇ°àµÄѧϰ·ÕΧ·Ç³£µÄºÃ£¬ÒÔÇ°ÉÏ´óѧµÄʱºòÒ»¸ö½ÌÊÒ¶¼Ã»ÓÐÉÏ×Ô¼ºµÄÏ°¹ß£¬µ«ÊÇÏÖÔÚÔÚÕâ¶ù£¬ÎҸоõ±ÈÎÒÉÏ´óѧÄǶù£¬ÍêÈ«²»ÊÇÒ»¸ö²ã´ÎµÄ£¬·Å¼ÙµÄʱºò½ÌÊÒÒ²ÓкܶàÈËÀ´Õâ¶ùѧϰ£¬ÎÒÏ뼴ʹ²»ÄÜÔÚ¶Ìʱ¼ä³ÉΪ¸ßÊÖ£¬µ«¸¶³öºÍÊÕ»ñµÄÓÀÔ¶ÊÇÏศÏà³ÉµÄ¡£
Ô¼ÊøµÄÀàÐͼ°¸÷×ԵĶ¨Òå·½·¨£º
1£® ·Ç¿Õ not null
2£® Î¨Ò»£¬uniqu
3£® Ö÷¼ü primary key
a) ¶¨Òå±íʱֱ½ÓÔÚ×Ö¶ÎÉ϶¨Òå
b) ConstraintÃû³Æ primary key(ÁÐ)
c) Alter table ±íÃû
Add constraint Ãû primary key (ÁÐ)
d) ×éºÏÖ÷¼ü
1.±íÄÚ²¿¡£constraintÃûprimary key(ÁÐ1£¬ÁÐ2)
2£®±íÍⲿ
Alter table ±íÃû
Add constraint Ãû primary key(ÁÐ1£¬ÁÐ2);
°´BÖÖ·½·¨ÊÇÔÚÏîÄ¿ÖÐʹÓýÏƵ·±µÄ£¬ÒòΪÕâÑù¿ÉÒÔ½«Óï¾äºÍÔ¼ÊøÏà·Ö¿ªÀ´£¬±ãÓڲ鿴¡£
4.Íâ¼ü
Constraint Ãû foreign key()  references ±íÃû(×Ö¶Î)
Ò»ÕűíµÄÒ»¸ö×ֶοÉÒÔÒýÓÃÒ»¸ö±¾±íµÄÖ÷¼ü¡£
²é¿´Ô¼Êø
Select * from user_constraints where table_name=’’;
4£® CHECK Ô¼Êø
a) Add constraint Ãû×Ö check(salary>6000)
ɾ³ýÔ¼Êø£º
Alter table tableName
Drop constraint Ô¼ÊøµÄÃû³Æ
ɾ³ýÖ÷¼üºÍÏà¹ØÊôÐÔ
Constraint :Ô¼Êø
1.Ϊָ¶¨µÄÈËȺ£¨±ÈÈçÖØÇìÈË£©Ìṩ¹©²Í
2.Ìṩ»áÔ±»úÖÆ
ÔÚʵ¼ÊµÄÓ¦ÓÃÖÐÊÇ£¬µ¥¶À´´½¨Ô¼Êø£¬ÕâÑù¾ÍÒªÒÔʵÏÖÁ˱íÓëÔ¼ÊøµÄ·ÖÀë¡£
Ë÷Òý£º
--¼Ó¿ì²éѯËÙ¶È
Create INDEX index on table (column[,column]);
Drop INDEX index;
1£® ÊÇÔõôÕûһǧÍòÌõ¼Ç¼µÄ°¡£¿
2£® ÏÖÔÚ²ÅÖªµÀµ±³õÎÒµÄ×ö·¨ÊǶàôµÄ±¿£¡
3£® ÔÚʵÏÖÏîÄ¿Öд´½¨Ë÷ÒýµÄ¼¼ÇÉ¡£
ͬÒå´Ê  
¾ÍÊÇÊý¾Ý¿âµÄÒ»¸ö±ðÃû
Óï·¨¸ñʽ£º
CREATE SY


Ïà¹ØÎĵµ£º

OracleÊý¾Ý¿âWhereÌõ¼þÖ´ÐÐ˳Ðò

1.ORACLE²ÉÓÃ×Ô϶øÉϵÄ˳Ðò½âÎöWHERE×Ó¾ä,¸ù¾ÝÕâ¸öÔ­Àí,±íÖ®¼äµÄÁ¬½Ó±ØÐëдÔÚÆäËûWHEREÌõ¼þ֮ǰ, ÄÇЩ¿ÉÒÔ¹ýÂ˵ô×î´óÊýÁ¿¼Ç¼µÄÌõ¼þ±ØÐëдÔÚWHERE×Ó¾äµÄĩβ.
¡¡¡¡ÀýÈç:
¡¡¡¡(µÍЧ)
¡¡¡¡SELECT … from EMP E WHERE SAL > 50000 AND JOB = ‘MANAGER’ AND 25 < (SELECT COUNT(*) from EMP WH ......

oracle ¼ì²é±»ËøµÄ±í¼°½âËø

´¦Àí·½·¨Ò» £º
¼ì²éÄǸö±í±»Ëø
select sess.sid,sess.serial#, lo.oracle_username,lo.os_user_name,ao.object_name,lo.locked_mode
from v$locked_object lo,dba_objects ao,v$session sess
where ao.object_id = lo.object_id
and lo.session_id = sess.sid;
½âËø
alter system kill session '273,45';
´¦Àí·½·¨¶ ......

Java·¾¶ÎÊÌâ×îÖÕ½â¾ö·½°¸

Ç°ÑÔ
¡¡¡¡JavaµÄ·¾¶ÎÊÌ⣬·Ç³£ÄѸ㡣×î½üµÄ¹¤×÷Éæ¼°µ½´´½¨ºÍ¶ÁÈ¡ÎļþµÄ¹¤×÷£¬ÕâÀïÎҾ͸ø´ó¼Ò³¹µ×µÃ½â¾öJava·¾¶ÎÊÌâ¡£
¡¡
¡¡ÎÒ±àдÁËÒ»¸ö·½·¨£¬±ÈClassLoader.getResource(String
Ïà¶Ô·¾¶)·½·¨µÄÄÜÁ¦¸üÇ¿¡£Ëü¿ÉÒÔ½ÓÊÜ"../"ÕâÑùµÄ²ÎÊý£¬´ðÓ¦ÎÒÃÇÓÃÏà¶Ô·¾¶À´¶¨Î»classpathÍâÃæµÄ×ÊÔ´¡£ÕâÑù£¬ÎÒÃǾͿÉÒÔʹÓÃÏ ......

javaÄÚ´æ»ØÊÕ»úÖÆ

ÒýÑÔ
JavaµÄ¶ÑÊÇÒ»¸öÔËÐÐʱÊý¾ÝÇø,ÀàµÄʵÀý(¶ÔÏó)´ÓÖзÖÅä¿Õ¼ä¡£JavaÐéÄâ»ú(JVM)µÄ¶ÑÖд¢´æ×ÅÕýÔÚÔËÐеÄÓ¦ÓóÌÐòËù½¨Á¢µÄËùÓжÔÏó£¬ÕâЩ¶ÔÏóͨ¹ýnew¡¢newarray¡¢anewarrayºÍmultianewarrayµÈÖ¸ÁÁ¢£¬µ«ÊÇËüÃDz»ÐèÒª³ÌÐò´úÂëÀ´ÏÔʽµØÊÍ·Å¡£Ò»°ãÀ´Ëµ£¬¶ÑµÄÊÇÓÉÀ¬»ø»ØÊÕ À´¸ºÔðµÄ£¬¾¡¹ÜJVM¹æ·¶²¢²»ÒªÇóÌØÊâµÄÀ¬»ø»ØÊÕ¼¼Êõ£ ......

±±¾©java֮· ´«ÖDz¥¿Í

À´µ½±±¾©´«ÖDz¥¿ÍÒ»ÔÂÓÐÓà ÉîÓид¥  
ÕýËùνı¶¨¶øºó¶¯ Ãæ¶Ô¹úÄÚ·×˵ÖÚÜ¿µÄÅàѵ»ú¹¹ °³ºÜÔÎ
ÏÈ˵˵µØÀíλÖÃ×î½üµÄ±¾ÍÁÅàѵ»ú¹¹°É òËƽÌѧʱ¼ä±È½Ï³¤ ÒªÒ»ÄêÖ®¾Ã Ö÷ÒªÕÐÊÕÔÚУ´óѧÉú ½Ìѧʱ¼äÊÇÍíÉÏ µÚÒ»¸ö±»±»ÈËpass
´Ó¶ø¿ªÊ¼Ñ°ÕÒÔÚÊ¡»áµÄÅàѵ»ú¹¹ òËÆѧ·ÑÌ«¹ó ºÍ±¾ÈËÔ¤ËãÓÐËù³åÍ»  pass
×îºóÎÒÖÕÓÚÕ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ