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

ORACLE ÐÐתÁÐ ²âÊÔͨ¹ý£¨9i£©

--ORACLE ÐÐתÁР ²âÊÔͨ¹ý£¨9i£©
/***************************************************************************************************
ÒÔѧÉú³É¼¨ÎªÀý×Ó£¬±È½ÏÐÎÏóÒ×¶®
***********************************************************************************************************/
--1¡¢ÐÐתÁÐ
--> --> Éú³É²âÊÔÊý¾Ý
drop table Class ;
Create table Class(Student varchar2(20),Course varchar2(20),Score number) ;
Insert into Class
(
select 'ÕÅÈý','ÓïÎÄ',78 from dual union all
select 'ÕÅÈý','Êýѧ',87 from dual union all
select 'ÕÅÈý','Ó¢Óï',82 from dual union all
select 'ÕÅÈý','ÎïÀí',90 from dual union all
select 'ÀîËÄ','ÓïÎÄ',65 from dual union all
select 'ÀîËÄ','Êýѧ',77 from dual union all
select 'ÀîËÄ','Ó¢Óï',65 from dual union all
select 'ÀîËÄ','ÎïÀí',85 from dual );
--case ·½Ê½:
select Student,sum(ÓïÎÄ) ÓïÎÄ,sum(Êýѧ) Êýѧ,sum(ÎïÀí) ÎïÀí,sum(Ó¢Óï) Ó¢Óï
 from(
       select  Student,       
    case Course when 'ÓïÎÄ' then Score else 0 end as ÓïÎÄ,
    case Course when 'Êýѧ' then Score else 0 end as Êýѧ,
    case Course when 'ÎïÀí' then Score else 0 end as ÎïÀí,
    case Course when 'Ó¢Óï' then Score else 0 end as Ó¢Óï
from  Class )
group by Student;
--decode ·½Ê½:
select student,sum(decode(Course,'ÓïÎÄ', Score,0)) as ÓïÎÄ,
sum(decode(Course,'Êýѧ', Score,0)) as Êýѧ,
sum(decode(Course,'ÎïÀí', Score,0)) as ÎïÀí,
sum(decode(Course,'Ó¢Óï', Score,0)) as Ó¢Óï
from Class
group by student;
drop table Class ;


Ïà¹ØÎĵµ£º

jdbcÁ¬½ÓOracle

      ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
    ½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
    ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
    Ê×ÏÈ£¬Ô ......

oracleµÄ·ÖÎöº¯Êýover ¼°¿ª´°º¯Êý


oracleµÄ·ÖÎöº¯Êýover ¼°¿ª´°º¯Êý
Ò»£º·ÖÎöº¯Êýover
Oracle´Ó8.1.6¿ªÊ¼Ìṩ·ÖÎöº¯Êý£¬·ÖÎöº¯ÊýÓÃÓÚ¼ÆËã»ùÓÚ×éµÄijÖÖ¾ÛºÏÖµ£¬ËüºÍ¾ÛºÏº¯ÊýµÄ²»Í¬Ö®´¦ÊÇ
¶ÔÓÚÿ¸ö×é·µ»Ø¶àÐУ¬¶ø¾ÛºÏº¯Êý¶ÔÓÚÿ¸ö×éÖ»·µ»ØÒ»ÐС£
ÏÂÃæÍ¨¹ý¼¸¸öÀý×ÓÀ´ËµÃ÷ÆäÓ¦Óᣠ          &nb ......

Oracle ѧϰ±Ê¼Ç: SYSDBAµÇ½ȨÏÞÎÊÌâ

±¾ÎÄ»·¾³ÅäÖãºOracle10gR2£¬Windows XP
OracleµÄÓû§ÐÅÏ¢Ò»°ãÀ´ËµÊDZ£´æÔÚÊý¾Ý×ÖµäÀïµÄ£¬ËùÒÔ³£¹æÓû§ÔÚOracleÊý¾Ý¿âûÓÐÆô¶¯µÄʱºòÊÇÎÞ·¨µÇ½µÄ¡£µ«ÓÐÁ½ÀàÓû§ÀýÍ⣬Õâ¾ÍÊǾßÓÐsysdba»òÕßsysoperȨÏÞµÄÓû§¡£Oracle sysdba»òÕßsysoperÓû§µÄµÇ½ÓÐÁ½ÖÖ·½Ê½£ºÒ»ÊÇͨ¹ýOSÈÏÖ¤£¬¶þÊÇͨ¹ýÃÜÂëÎļþÑéÖ¤¡£
¾¿¾¹Ê¹ÓÃÄÄÒ»ÖÖÑéÖ¤ ......

²é¿´oracleµÄϵͳÎļþÄÚÈÝ

ÔÚÃüÁî¸ñʽÏ£¬½øÈësqlplusµÄ±à¼­×´Ì¬ÖÐ
 
£¨1£©²é¿´¿ØÖÆÎļþµÄÄÚÈÝ£º
SQL> DESC v$controlfile
 Ãû³Æ                               &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ