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

³£ÓõÄһЩORACLEÃüÁî

²éÕÒÊý¾Ý¿âÖÐËùÓÐ×ֶΠ ÒÔ¶ÔÓ¦µÄ±í
select C.column_name,C.TABLE_NAME from dba_tab_columns C where owner=''
²éÿ¸ö¿ÆÄ¿class ·ÖÊýscroǰÈýÃû
select id, name, class, scro
   from (select row_number() over(partition by class order by scro desc)  cnt,
                id,
                name,
                class,
                scro
           from student) a
  where a.cnt <= 3;
²éÕÒÅÅÐòºóµÄǰÈýÐÐ
  select *
  from (select rw.*, rownum
          from (select *
                  from student d
                 where d.class = 'b'
                 order by d.scro desc) rw
         where rw.id >= 1
         order by rw.class desc) n
where rownum <= 3
±í¸´ÖÆ
insert into table_a (id,name,age) select b.id,b.name,b.age from table_b;
--ɾ³ý±íÊý¾ÝµÄ´¥·¢Æ÷
CREATE OR REPLACE PROCEDURE delete_data
IS
BEGIN
   delete from test ;
   COMMIT;
EXCEPTION
   WHEN NO_DATA_FOUND
   THEN
      NULL;
   WHEN OTHERS
   THEN
      RAISE;
END delete_data;
--¶¨Ê±É¾³ý  ÿ¸ô5·ÖÖÓÖ´ÐÐÒ»´ÎµÄ¼Æ»®
DECLARE
  X NUMBER;
BEGIN
  SYS.DBMS_JOB.SUBMIT
&nbs


Ïà¹ØÎĵµ£º

OracleÊý¾Ý¿âÍêÈ«Ð¶ÔØ

1¡¢ Í£Ö¹oracleËùÓеķþÎñ£¨¿ªÊ¼--ÔËÐÐ--ÊäÈëservices.msc£©
2¡¢ ɾ³ý×¢²á±íÉϵÄORACLEµÄÓйؼüÖµ(¿ªÊ¼-->ÔËÐÐ-->ÊäÈëregedit£©½«HKEY_LOACAL_MACHINE/SOFTWAREϵÄÖ÷¼üORACLEÈ«²¿É¾³ý¡£
3. ÏÂÃæÉ¾³ýOracle·þÎñ£º½øÈëHKEY_LOACAL_MACHINE/SYSTEMÖ÷¼üÏ£¬ÔÚControlSet001¡¢ControlSet002¡¢CurrentControlSet--> ......

110¸öOracle ³£Óú¯ÊýµÄ×ܽá2

60.AVG(DISTINCT|ALL)
all±íʾ¶ÔËùÓеÄÖµÇ󯽾ùÖµ,distinctÖ»¶Ô²»Í¬µÄÖµÇ󯽾ùÖµ
SQLWKS> create table table3(xm varchar(8),sal number(7,2));
Óï¾äÒÑ´¦Àí¡£
SQLWKS> insert into table3 values(gao,1111.11);
SQLWKS> insert into table3 values(gao,1111.11);
SQLWKS> insert into table3 values(zhu ......

110¸öOracle ³£Óú¯ÊýµÄ×ܽá3

80¡£LAST
¹¦ÄÜÃèÊö£º´ÓDENSE_RANK·µ»ØµÄ¼¯ºÏÖÐÈ¡³öÅÅÔÚ×îºóÃæµÄÒ»¸öÖµµÄÐУ¨¿ÉÄܶàÐУ¬ÒòΪֵ¿ÉÄÜÏàµÈ£©£¬Òò´ËÍêÕûµÄÓï·¨ÐèÒªÔÚ¿ªÊ¼´¦¼ÓÉÏÒ»¸ö¼¯ºÏº¯ÊýÒÔ´ÓÖÐÈ¡³ö¼Ç¼
SAMPLE£ºÏÂÃæÀý×ÓÖÐDENSE_RANK°´²¿ÃÅ·ÖÇø£¬ÔÙ°´Ó¶½ðcommission_pctÅÅÐò£¬FIRSTÈ¡³öÓ¶½ð×îµÍµÄ¶ÔÓ¦µÄËùÓÐÐУ¬È»ºóÇ°ÃæµÄMAXº¯Êý´ÓÕâ¸ö¼¯ºÏÖÐÈ¡³öнˮ×îµ ......

oracleÉèÖÃSGA

Ê×ÏÈÒÔsysdbaÉí·ÝµÇ¼
sqlplus connect system/orcl as sysdba;
È»ºóÐ޸IJÎÊý
1.sga_target²»ÄÜ´óÓÚsga_max_size£¬¿ÉÒÔÉèÖÃΪÏàµÈ¡£
2.SGA¼ÓÉÏPGAµÈÆäËû½ø³ÌÕ¼ÓõÄÄÚ´æ×ÜÊý±ØÐëСÓÚ²Ù×÷ϵͳµÄÎïÀíÄÚ´æ¡£
alter system set sga_target=150M scope=spfile;
alter system set sga_max_size=150M scope=spfile;
//Êý¾Ý¿â ......

oracle¸ù¾ÝÖ÷Íâ¼ü²é±í

select a.constraint_name, a.table_name, b.constraint_name
  from user_constraints a, user_constraints b
where a.constraint_type = 'R'
  and b.constraint_type = 'P'
  and a.r_constraint_name = b.constraint_name
P ´ú±íÖ÷¼ü
R ´ú±íÍâ¼ü ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ