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

Oracleɾ³ýÓû§±íµÄʵ¼Ê²Ù×÷Ó¦ÓÃ

ÒÔϵÄÎÄÕÂÖ÷Òª½²ÊöµÄÊÇOracleɾ³ýÓû§±íµÄʵ¼Ê²Ù×÷·½°¸£¬±¾ÎÄÖ÷ÒªÊÇÒÔÏà¹Øʵ¼ÊÓ¦ÓôúÂëµÄ·½Ê½À´Òý³öÆäʵ¼ÊµÄ²Ù×÷²½Ö裬ÒÔϾÍÊÇÎÄÕµľßÌåÄÚÈÝÃèÊö£¬ÍûÄãÔÚä¯ÀÀÖ®ºó»áÓÐËùÊÕ»ñ¡£
1.
select 'Drop table '||table_name||';' from all_tables where owner='Ҫɾ³ýµÄÓû§Ãû£¨×¢ÒâÒª´óд£©';

2.Oracleɾ³ýÓû§±í ÒÔÓû§testΪÀý
for example: declare cursor cur1 is select table_name from dba_tables where owner='TEST'; begin for cur2 in cur1 loop execute immediate 'drop table test.'||cur2.table_name; end loop; end;
3.Õâ¸öɾ³ýµ±Ç°Óû§µÄËùÓжÔÏó(±í¡¢ÊÓͼ¡¢´¥·¢Æ÷¡¢´æ´¢¹ý³Ì¡¢º¯Êý)
DECLARE TYPE name_list IS TABLE OF VARCHAR2(40); TYPE type_list IS TABLE OF VARCHAR2(20); Tab_name name_listname_list:=name_list(); Tab_type type_listtype_list:=type_list(); sql_str VARCHAR2(500); BEGIN sql_str := 'select uo.object_name,uo.object_type from user_objects uo where uo.object_type not in(''INDEX'',''LOB'') order by uo.object_type desc'; EXECUTE IMMEDIATE sql_str BULK COLLECT INTO tab_name,tab_type; FOR i IN Tab_name.FIRST.. Tab_name.LAST LOOP sql_str := 'DROP ' || Tab_type(i) || ' ' || Tab_name(i); EXECUTE IMMEDIATE sql_str; END LOOP; END;
------------------------------------------------------------------------------------------------------------------------------


Ïà¹ØÎĵµ£º

oracleÊý¾Ý¿âÖв鿴ËùÓбíSQL

select   table_name   from   user_tables;     //µ±Ç°Óû§µÄ±í  
   
  select   table_name   from   all_tables;     //ËùÓÐÓû§µÄ±í  
   
  select   table_name   from   dba_tables;   &n ......

.batÆô¶¯Êý¾Ý¿â·þÎñ(MSSQL,Oracle)

 @echo off
:dosmenu
REM Ñ¡Ôñ²Ëµ¥
echo  Windows ·þÎñÆô¶¯»ò¹Ø±Õ By hope 2008Äê2ÔÂ7ÈÕ     
echo.
echo [1]Æô¶¯Sql Server2005   [2]¹Ø±ÕSql Server2005
echo [3]Æô¶¯Oracle9i         [4]¹Ø±ÕOracle9i
echo.
echo  ......

´Óoracle±íÖÐËæ»úÈ¡¼Ç¼£¬²úÉúËæ»úÊýºÍËæ»ú×Ö·û´®


1¡¢´Ó±íÖÐËæ»úÈ¡¼Ç¼
    select * from (select * from staff order by dbms_random.random)
    where rownum < 4
    ±íʾ´ÓSTAFF±íÖÐËæ»úÈ¡3Ìõ¼Ç¼
2¡¢²úÉúËæ»úÊý
        SELECT DBMS_RANDOM.RANDOM from DUAL;
     ......

Oracle½âËøÒÔ¼°³£Óûù±¾²Ù×÷

-----------------------------------------------------------------------------------
DOS:
1. sqlplus
2.
   Óû§Ãû:sqlplus ¡¢conn
   ÃÜÂë:as sysdba ¡¢as sysdba  
½âËø£º
3. ALTER USER DBSNMP ACCOUNT UNLOCK£»
½âËø£ºsystem
4. alter user system identified by manage ......

OracleÈÏÖ¤½éÉÜ

ORACLEÅàѵ(OCA)ÈÏÖ¤½éÉÜ 
Oracle10g Certified Associate (OCA) Oracle ÈÏ֤רԱ¡£
¿¼ÊԳɼ¨Í¨¹ýÄÜ»ñµÃOracle¹«Ë¾ÎªÄú°ä·¢µÄÈ«ÇòÈÏÖ¤µÄÓ¢ÎÄOCAÖ¤Êé¡£OCAÓÉOracle¹«Ë¾³öÌâ¡£
¸ÃÖ¤Êé¿É×÷Ϊ¸÷ÆóÊÂÒµµ¥Î»Êý¾Ý¿â¹ÜÀíÈËÔ±ÉϸڵÄÒÀ¾Ý¡£
Ä¿Ç°ÒѳÉΪ¸÷IT¹«Ë¾¼°Ïà¹ØÆóÒµÕùÏྺƸµÄÊý¾Ý¿â¹ÜÀíά»¤È˲ţ¬ÊÇÊý¾Ý¿âά»¤¹ÜÀíÈËÔ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ