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

oracleÁÐתÐÐÎÊÌâ - Oracle / »ù´¡ºÍ¹ÜÀí

ÏÖÔÚÒ»¸ö±íÖÐÓÐÁ½ÁÐÊý¾Ý
shuliang area
1 025
2 0510
3 0511
4 0512
5 0513
ÒªÇóÊÇ°Ñarea×Ö¶ÎÖеÄֵת»»³É³ÇÊÐÃû³Æ£¬±ÈÈç025ÊÇÄϾ©£¬0510ÊÇÎÞÎý£¬0511ÊÇÕò½­£¬0512ÊÇËÕÖÝ£¬0512ÊÇÄÏͨ
ÏÔʾ³É
ÄϾ© ÎÞÎý Õò½­ ËÕÖÝ ÄÏͨ
1 2 3 4 5

ÇëÎÊsqlÔõôд°¡

SQL code:

select sum(case when area = '025' then shuliang else 0 end) as ÄϾ©
,sum(case when area = '0510' then shuliang else 0 end) as ÎÞÎý
,sum(case when area = '0511' then shuliang else 0 end) as Õò½­
,sum(case when area = '0512' then shuliang else 0 end) as ËÕÖÝ
,sum(case when area = '0513' then shuliang else 0 end) as ÄÏͨ
from ±íÃû;



select 
case when area='025' then shuliang end ÄϾ©,
case when area='0510' then shuliang end ÎÞÎý,
case when area='0511' then shuliang end Õò½­,
case when area='0512' then shuliang end ËÕÖÝ,
case when area='0513' then shuliang end ÄÏͨ
from ±í;

select sum(decode(area, '025', 1, 0)) as ÄϾ©,
  sum(decode(area, '0510', 1, 0)) as ÎÞÎý,
  sum(decode(area, '0511', 1, 0)) as Õò½­,
  sum(decode(area, '0512', 1, 0)) as ËÕÖÝ,
  sum(decode(area, '0513', 1, 0)) as ÄÏͨ
  from t
 group by area



Ïà¹ØÎÊ´ð£º

oracle spatial¿Õ¼äº¯Êý³ö´í - Oracle / ¸ß¼¶¼¼Êõ

ÔÚÖ´ÐаüµÄʱºòÒýÓÃoracle spatial¿Õ¼äº¯Êý³ö´í£¬³ö´íÇé¿öÈçÏÂ
Errors in file
/user/oracle/app/oracle/admin/grid/udump/grid1_ora_143768.trc: ORA-29902:
error in executing ODCIIndexStart() routine ORA-0 ......

oracle 9i ×î½ü·¢Ïֵǽ±¨´í - Oracle / »ù´¡ºÍ¹ÜÀí

ÓÃPL/SQL µÇ½ʱµ¯³ö±¨´í´°¿Ú£¬´íÎóÈçÏ£¡
  ORA-01034:ORACLE not available
  ORA-27101:shared memory realm does not exist
ÇëÎÊ£¬ÓÐûÓÐÈËÓöµ½ÕâÖÖÇé¿ö£¬Ôõô½â¾ö£¿Ð»Ð»£¡

1. Oracle sid ÕýÈ ......

oracle 10g data guard - Oracle / »ù´¡ºÍ¹ÜÀí

×öÍædata guard ºó
ÔÚPrimary·þÎñÆ÷ Ö´ÐР
SQL>SELECT SEQUENCE#,APPLIED from V$ARCHIVED_LOG ORDER BY SEQUENCE#;
 SEQUENCE# APP
---------- ---
  13 NO
  13 YES ......

oracle³õѧÕßÄãÇë½Ì - Oracle / »ù´¡ºÍ¹ÜÀí

--½¨Á¢Ò»¸ö°üÒÔ¶¨ÒåÒ»¸öÓαê
create or replace package PK_test 
as 
type cur_test is ref cursor;
end PK_test;
--½¨Á¢Ò»¸ö¹ý³Ì,ͨ¹ýÊäÈëJOBID£¬·µ»ØÒ»¸ö±í¼Ç¼£¨Óα꣩!
create or replace ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ