ORACLEÖÐÈçºÎ²éÕÒÌض¨¶ÔÏóÖеÄÎı¾ÄÚÈÝ~
SQL> select dbms_metadata.get_ddl('PROCEDURE','PRO2','SCOTT') text from dual;
TEXT
----------------------------------------
CREATE OR REPLACE PROCEDURE "SCOTT"."P
RO2"
is
begin
dbms_output.put_line('wangpeng up');
end;
SQL> select dbms_metadata.get_ddl('PROCEDURE','PRO1','SCOTT') text from dual;
TEXT
----------------------------------------
CREATE OR REPLACE PROCEDURE "SCOTT"."P
RO1"
is
begin
dbms_output.put_line('wanghai up');
end;
SQL> select * from(
2 SELECT NAME , LINE , 'Create or Replace ' || TEXT as text
3 from USER_SOURCE
4 WHERE TYPE = 'PROCEDURE'
5 AND LINE = 1
6 UNION
7 SELECT NAME, LINE, TEXT as text
8 from USER_SOURCE
9 WHERE TYPE = 'PROCEDURE'
10 AND LINE > 1
11 UNION
12 SELECT NAME, 999999 , '/' as text
13 from USER_SOURCE
14 WHERE TYPE = 'PROCEDURE'
15 AND LINE = 1
16 ORDER BY 1, 2
17 ) c
18 where UPPER(c.text) like '%WANGHAI%';
NAME LINE TEXT
---------- ------- ----------------------------------------
PRO1 4 dbms_output.put_line('wanghai up');
SQL> select * from(
2 SELECT NAME , LINE , 'Create or Replace ' || TEXT as text
3 from USER_SOURCE
4 WHERE TYPE = 'PROCEDURE'
5 AND LINE = 1
6 UNION
7 SELECT NAME, LINE, TEXT as text
8 from USER_SOURCE
9 WHERE TYPE = 'PROCEDURE'
10 AND LINE > 1
11 UNION
12 SELECT NAME, 999999 , '/' as text
13 from USER_SOURCE
14 WHERE TYPE = 'PROCEDURE'
15 AND LINE = 1
16 ORDER BY 1, 2
17 ) c
18 where UPPER(c.text) like '%WANGPENG%';
NAME LINE TEXT
---------- ------- ----------------------------------------
PRO2 4 dbms_output.put_line('wangpeng up');
SQL> select * from(
2 SELECT NAME , LINE , 'Create or Replace ' || TEXT as text
3 from USER_SOURCE
4 WHERE TYPE = 'PROCEDURE'
5 AND LINE = 1
6 UNION
7 SELECT NAME, LINE, TEXT as text
8 from USER_SOURCE
9 WHERE TY
Ïà¹ØÎĵµ£º
in ÊÇ°ÑÍâ±íºÍÄÚ±í×÷hash Á¬½Ó£¬¶øexistsÊǶÔÍâ±í×÷loopÑ»·£¬Ã¿´ÎloopÑ»·ÔÙ¶ÔÄÚ±í½øÐвéѯ¡£
Ò»Ö±ÒÔÀ´ÈÏΪexists±ÈinЧÂʸߵÄ˵·¨ÊDz»×¼È·µÄ¡£
Èç¹û²éѯµÄÁ½¸ö±í´óСÏ൱£¬ÄÇôÓÃinºÍexists²î±ð²»´ó¡£
in ÊÇ°ÑÍâ±íºÍÄÚ±í×÷hash
Á¬½Ó£¬¶øexistsÊǶÔÍâ±í×÷loopÑ»·£¬Ã¿´ÎloopÑ»·ÔÙ¶ÔÄÚ±í½øÐвéѯ¡£
Ò»Ö±ÒÔ ......
µÚÒ»¿Î£º¿Í»§¶Ë
1. Sql Plus(¿Í»§¶Ë£©£¬ÃüÁîÐÐÖ±½ÓÊäÈ룺sqlplus£¬È»ºó°´ÌáʾÊäÈëÓû§Ãû£¬ÃÜÂë¡£
2. ´Ó¿ªÊ¼³ÌÐòÔËÐÐ:sqlplus£¬ÊÇͼÐΰæµÄsqlplus.
3. http://localhost:5560/ ......
×î½ü¹«Ë¾´òËãÔÚÏÂÒ»´ú¼Æ·ÑϵͳÀïÃæʹÓÃÄÚ´æÊý¾Ý¿âµÄ¼¼Êõ£¬ËùÒÔ×÷Ϊ¹«Ë¾µÄÉè¼ÆÈËÔ±Ö®Ò»µÄÎÒ£¬ÔÚoracleÍøÉÏÏÂÁ˸öTimesTen£¬°²×°ÔÚÎÒÃǵIJâÊÔ·þÎñÆ÷ÉÏÃæaix5£¬Õâƪ¶ÌÎÄÖ÷ÒªÊÇÎÒ²Ù×÷Êý¾Ý¿âµÄÒ»¸ö±Ê¼Ç£¬ÏÂһƪ´òËã·¢Ò»¸öc³ÌÐòµÄÀý×ÓºÍÎÒ²âÊԵĽá¹û£¬ºóÐø¿ÉÄÜ»¹»áʹÓÃTimesTen cache of oracleÕâ¸ö²úÆ·£¬Â½ÐøÒ²»á·¢Ò»ÏÂÕâ· ......
INTERVAL DAY TO SECONDÊý¾ÝÀàÐÍ
OracleÓï·¨:
INTERVAL '{ integer | integer time_expr | time_expr }'
{ { DAY | HOUR | MINUTE } [ ( leading_precision ) ]
| SECOND [ ( leading_precision [, fractional_seconds_precision ] ) ] }
[ TO { DAY | HOUR | MINUTE | SECOND [ (fractional_seconds_precision) ] } ......
oracle Êý¾Ý¿âÀï²é¿´±í¿Õ¼äÊ©Óþ°¿ö£»
oracle±í¿Õ¼äµÄʶùÇé¿öÒª³£³£²é¿´£¬Õý³£ÏпձÈÂʹýµÍµÄʱ·Ö¾ÍÓ¦¸Ã˼¿¼Ôö´ó±í¿´¿Õ¼äÁË¡£²é¿´²½ÖèÈç´ÎSQL:
²½Öè1£º
select dbf.tablespace_name,
dbf.totalspace "×ÜÁ¿(M)",
dbf.totalblocks as ×Ü¿éÊý,
dfs.freespace "ÓàÏÂ×ÜÁ¿(M)",
dfs.freeblocks "ÓàÏ¿éÊý",
(dfs.f ......