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

ORACLEʹÓÃEXCEPTIONS±í²éѯ³ö±íÖÐÖØ¸´¼Ç¼

SQL> conn system/oracle
Connected.
SQL> create table scott.t1(id number primary key,name varchar2(10)); --´´½¨²âÊÔ±í
Table created.
SQL> select constraint_name,table_name,constraint_type, --²é¿´ÏàÓ¦ÍêÕûÐÔÔ¼ÊøµÄ״̬
  2  status,deferrable,deferred,validated
  3  from dba_constraints
  4  where owner='SCOTT' and table_name='T1';
CONSTRAINT_NAME                TABLE_NAME                     C STATUS
------------------------------ ------------------------------ - --------
DEFERRABLE     DEFERRED  VALIDATED
-------------- --------- -------------
SYS_C0023319                   T1                             P ENABLED
NOT DEFERRABLE IMMEDIATE VALIDATED
SQL> insert into scott.t1 values(1,'tt');
1 row created.
SQL> insert into scott.t1 values(1,'hh');  --²åÈëidÁÐÖØ¸´µÄ¼Ç¼ʧ°Ü
insert into scott.t1 values(1,'hh')
*
ERROR at line 1:
ORA-00001: unique constraint (SCOTT.SYS_C0023319) violated
SQL> alter table scott.t1 disable novalidate constraint SYS_C0023319;  --ÐÞ¸ÄÔ¼Êø×´Ì¬
Table altered.
SQL> select constraint_name,table_name,constraint_type,  --²é¿´ÏàÓ¦ÍêÕûÐÔÔ¼ÊøµÄ״̬
  2  status,deferrable,deferred,validated
  3  from dba_constraints
  4  where owner='SCOTT' and table_name='T1';
CONSTRAINT_NAME                TABLE_NAME                     C STATUS
--------


Ïà¹ØÎĵµ£º

oracle ³£Óú¯Êý

SQLÖеĵ¥¼Ç¼º¯Êý
1.ASCII
·µ»ØÓëÖ¸¶¨µÄ×Ö·û¶ÔÓ¦µÄÊ®½øÖÆÊý;
SQL> select ascii(’A’) A,ascii(’a’) a,ascii(’0’) zero,ascii(’ ’) space from dual;
A A ZERO SPACE
--------- --------- --------- ---------
65 97 48 32
2.CHR
¸ø³öÕûÊý,·µ»Ø¶ÔÓ¦µÄ× ......

½¨Á¢OracleÈ«ÎÄË÷Òý

×î½üÒª×öËÑË÷£¬ËùÒÔѧÆðOracleÈ«ÎÄË÷ÒýÀ´ÁË¡£
²Î¿¼ÎÄÕ£ºhttp://www.eygle.com/archives/2005/06/ecieoaoracleeia.html
ÈçºÎʹÓÃOracleÈ«ÎļìË÷¹¦ÄÜ?
×÷Õß:eygle
³ö´¦:http://www.eygle.com/blog
ÈÕÆÚ:June 11, 2005
ä¯ÀÀ´ÎÊý:
890
±¾ÎÄÁ´½Ó:http://www.eygle.com/archives/2005/06/ecieoaoracleeia.html
±¾ÎļòÒª ......

oracle ÈÕÆÚº¯Êý

sqlÓï¾äÈçÏÂ:
select * from userdb40.numservice  where ServiceNumber =88880068
 and applytime <= to_date('2009-12-26 10:41:44','yyyy-MM-dd HH24:mi:ss')
select to_date('2007-06-28 19:51:20.0','yyyy-MM-dd HH24:mi:ss') from dual; ......

Oracle 10G R2 RAC ÈÕ³£¹ÜÀí

Ò»¡¢Ê¹ÓÃsrvctl¹ÜÀíRACÊý¾Ý¿â
[root@NODE01 bin]# pwd
/orac/crs/bin   # srvctlÔÚ$CRS_HOME/binĿ¼Ï£¬Ëü¿ÉÒÔÔÚÈκνڵãÉÏά»¤¡£
[root@NODE01 bin]# ./srvctl
Usage: srvctl <command> <object> [<options>]
    command: enable|disable|start|stop|relocate|status| ......

ORACLE directory Ŀ¼

Create directoryÈÃÎÒÃÇ¿ÉÒÔÔÚOracleÊý¾Ý¿âÖÐÁé»îµÄ¶ÔÎļþ½øÐжÁд²Ù×÷£¬¼«´óµÄÌá¸ßÁËOracleµÄÒ×ÓÃÐԺͿÉÀ©Õ¹ÐÔ¡£
ÆäÓ﷨Ϊ:
CREATE [OR REPLACE] DIRECTORY directory AS 'pathname';
±¾°¸Àý¾ßÌå´´½¨ÈçÏÂ:
create or replace directory exp_dir as '/tmp';
Ŀ¼´´½¨ÒԺ󣬾ͿÉÒ԰ѶÁдȨÏÞÊÚÓèÌØ¶¨Óû§£¬¾ßÌåÓï·¨ÈçÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ