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

ORACLE³£ÓÃSQL

񡜧
¡¡¡¡select * from cat;
¡¡¡¡select * from tab;
¡¡¡¡select table_name from user_tables;
ÊÓͼ£º
¡¡¡¡select text from user_views where view_name=upper('&view_name');
Ë÷Òý£º
¡¡¡¡select index_name,table_owner,table_name,tablespace_name,status from user_indexes order by table_name;
´¥·¢Æ÷£º
¡¡¡¡select trigger_name,trigger_type,table_owner,table_name,status from user_triggers;
¿ìÕÕ£º
¡¡¡¡select owner,name,master,table_name,last_refresh,next from user_snapshots order by owner,next;
ͬÒå´Ê£º
¡¡¡¡select * from syn;
ÐòÁУº
¡¡¡¡select * from seq;
Êý¾Ý¿âÁ´Â·£º
¡¡¡¡select * from user_db_links;
Ô¼ÊøÏÞÖÆ£º
¡¡¡¡select TABLE_NAME,CONSTRAINT_NAME,SEARCH_CONDITION,STATUS
    from user_constraints WHERE TABLE_name=upper('&TABLE_Name');
±¾Óû§¶ÁÈ¡ÆäËûÓû§¶ÔÏóµÄȨÏÞ£º
¡¡¡¡select * from user_tab_privs;
±¾Óû§ËùÓµÓеÄϵͳȨÏÞ£º
¡¡¡¡select * from user_sys_privs;
Óû§£º
¡¡¡¡select * from all_users order by user_id;
±í¿Õ¼äÊ£Óà×ÔÓɿռäÇé¿ö£º
¡¡¡¡select tablespace_name,sum(bytes) ×Ü×Ö½ÚÊý,max(bytes),count(*) from dba_free_space group by tablespace_name£»
Êý¾Ý×ֵ䣺
¡¡¡¡select table_name from dict order by table_name;
Ëø¼°×ÊÔ´ÐÅÏ¢£º
¡¡¡¡select * from v$lock;²»°üÀ¨DDLËø
Êý¾Ý¿â×Ö·û¼¯£º
¡¡¡¡select name,value$ from props$ where name='NLS_CHARACTERSET';
inin.ora²ÎÊý£º
¡¡¡¡select name,value from v$parameter order by name;
SQL ¹²Ïí³Ø£º
¡¡¡¡select sql _text from v$sqlarea;
Êý¾Ý¿â£º
¡¡¡¡select * from v$database
¿ØÖÆÎļþ£º
¡¡¡¡select * from V$controlfile;
ÖØ×öÈÕÖ¾ÎļþÐÅÏ¢£º
¡¡¡¡select * from V$logfile;
À´×Ô¿ØÖÆÎļþÖеÄÈÕÖ¾ÎļþÐÅÏ¢£º
¡¡¡¡select * from V$log;
À´×Ô¿ØÖÆÎļþÖеÄÊý¾ÝÎļþÐÅÏ¢£º
¡¡¡¡select * from V$datafile;
NLS²ÎÊýµ±Ç°Öµ£º
¡¡¡¡select * from V$nls_parameters;
ORACLE °æ±¾ÐÅÏ¢£º
¡¡¡¡select * from v$version;
ÃèÊöºǫ́½ø³Ì£º
¡¡¡¡select * from v$bgprocess;
²é¿´°æ±¾ÐÅÏ¢£º
¡¡¡¡select * from product_component_version;
Oracle -³£ÓÃ¼à¿ØSQL
1.¼à¿ØÊÂÀýµÄµÈ´ý£º
 &nb


Ïà¹ØÎĵµ£º

Oracle¶àÐмǼºÏ²¢/Á¬½Ó/¾ÛºÏ×Ö·û´®µÄ¼¸ÖÖ·½·¨

ʲôÊǺϲ¢¶àÐÐ×Ö·û´®£¨Á¬½Ó×Ö·û´®£©ÄØ£¬ÀýÈ磺
SQL> desc test;
Name     Type          Nullable Default Comments
------- ------------ -------- ------- --------
COUNTRY VARCHAR2(20) Y       &nb ......

oracleÓësqlserver²åÈëÊý¾Ý¶¯Ì¬×Ö¶ÎÖµ

¼Ç¼һÏÂÒÔ±¸Ï´οìËÙÕÒµ½¡£¡£¡£
       Íùtb_wf_privgrant±íÖвåÈëÒ»Ìõ¼Ç¼£¬workflow_id×Ö¶ÎÖµ´Ótb_wf_workflow ±íÖлñÈ¡workflow_name='֪ʶÉóºË'µÄËùÓмǼÖÐworkflow_id×î´óÖµ¡£
--oracle
declare   a NUMBER(10);
   begin
   select  max(wo ......

ORACLEº¯Êý´óÈ«


SQLÖеĵ¥¼Ç¼º¯Êý
1.ASCII
·µ»ØÓëÖ¸¶¨µÄ×Ö·û¶ÔÓ¦µÄÊ®½øÖÆÊý;
SQL> select ascii('A') A,ascii('a') a,ascii('0') zero,ascii(' ') space from dual;
        A         A      ZERO   &nbs ......

oracleºÏ²¢±íµÄË鯬

Shrink spaceºÏ²¢±íµÄË鯬
Ò»°ã±íÀïÓÐË鯬ÎÒÃǶ¼²ÉÓÃalter table table_name move tablespace_name,»òÕßexp,drop table table_name,impµÄ2ÖÖ·½Ê½10G¸øÎÒÃÇÆäËûµÄ·½·¨.ÏÂÃæÎÒÀ´ÊÔÒ»°É
ÓÃShrink SpaceÊÕËõOracleÊý¾Ý¶Î
ÔÚoracleÖпÉÒÔʹÓÃalter table table_name shrink spaceÊÕËõ±í,ʹÓÃshrinkÓÐÁ½¸öǰÌáÌõ¼þ:
  1¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ