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

oracle distinct

oracle distinct
¹Ø¼ü×Ö: distinctµÄһЩÔÓ̸
distinctÕâ¸ö¹Ø¼ü×ÖÀ´¹ýÂ˵ô¶àÓàµÄÖظ´¼Ç¼ֻ±£ÁôÒ»Ìõ£¬µ«ÍùÍùÖ»Óà ËüÀ´·µ»Ø²»Öظ´¼Ç¼µÄÌõÊý£¬¶ø²»ÊÇÓÃËüÀ´·µ»Ø²»ÖؼǼµÄËùÓÐÖµ¡£ÆäÔ­ÒòÊÇdistinctÖ»ÓÐÓöþÖØÑ­»·²éѯÀ´½â¾ö£¬¶øÕâÑù¶ÔÓÚÒ»¸öÊý¾ÝÁ¿·Ç³£´óµÄÕ¾À´Ëµ£¬ÎÞÒÉÊÇ»áÖ±½ÓÓ°Ï쵽ЧÂʵġ£
ÏÂÃæÏÈÀ´¿´¿´Àý×Ó£º
table±í
×Ö¶Î1     ×Ö¶Î2
   id        name
   1           a
   2           b
   3           c
   4           c
   5           b
¿â½á¹¹´ó¸ÅÕâÑù£¬ÕâÖ»ÊÇÒ»¸ö¼òµ¥µÄÀý×Ó£¬Êµ¼ÊÇé¿ö»á¸´Ôӵöࡣ
±ÈÈçÎÒÏëÓÃÒ»ÌõÓï¾ä²éѯµÃµ½name²»Öظ´µÄËùÓÐÊý¾Ý£¬ÄǾͱØÐëʹÓÃdistinctÈ¥µô¶àÓàµÄÖظ´¼Ç¼¡£
select distinct name from table
µÃµ½µÄ½á¹ûÊÇ:
 
---------- 
name
   a
   b
   c
ºÃÏñ´ïµ½Ð§¹ûÁË£¬¿ÉÊÇ£¬ÎÒÏëÒªµÃµ½µÄÊÇidÖµÄØ£¿¸ÄһϲéѯÓï¾ä°É:
select distinct name, id from table
½á¹û»áÊÇ:
---------- 
id name
   1 a
   2 b
   3 c
   4 c
   5 b
distinctÔõôûÆð×÷Óã¿×÷ÓÃÊÇÆðÁ˵ģ¬²»¹ýËûͬʱ×÷ÓÃÁËÁ½¸ö×ֶΣ¬Ò²¾ÍÊDZØÐëµÃidÓëname¶¼ÏàͬµÄ²Å»á±»Åųý¡£¡£¡£¡£¡£¡£¡£
ÎÒÃÇÔٸĸIJéѯÓï¾ä:
select id, distinct name from table
ºÜÒź¶£¬³ýÁË´íÎóÐÅÏ¢ÄãʲôҲµÃ²»µ½£¬distinct±ØÐë·ÅÔÚ¿ªÍ·¡£Äѵ½²»ÄÜ°Ñdistinct·Åµ½whereÌõ¼þÀÄÜ£¬ÕÕÑù±¨´í¡£
------------------------------------------------------------------------------------------------------------
ÏÂÃæ·½·¨¿ÉÐÐ:
select *, count(distinct name) from table group by name
½á¹û:
   id name count(distinct name)
   1 a 1
   2 b 1
   3 c 1
×îºóÒ»ÏîÊǶàÓàµÄ£¬²»ÓùܾÍÐÐÁË£¬Ä¿µÄ´ïµ½¡£¡£¡£¡£¡£
group by ±ØÐë·ÅÔÚ order by ºÍ limit֮ǰ£¬²»È»»á±¨´í
================


Ïà¹ØÎĵµ£º

oracle raw device create tablespace

  
[root@vmfs sysconfig]# lvdisplay |grep db_d
  LV Name                /dev/db_v4/db_d_22
  LV Name                /dev/db_v4 ......

oracleÁ¬½ÓÊý¾Ý¿â²âÊÔ´úÂë

oracleÁ¬½ÓÊý¾Ý¿â²âÊÔ´úÂë
/**
*
* ˵Ã÷£º
* £¨1£©±¾ÀýʹÓÃJDBC_ODBCÇŽøÐÐÊý¾Ý¿âÁ¬½Ó£¬¹Ê´ËÐèÒªODBCÊý¾ÝÔ´
* £¨2£©±¾ÀýÖÐSQLΪ¸üÐÂÓï¾ä£¬¹Ê´ËʹÓÃÔØÌåµÄexecuteUpdate·½·¨£¬²¢ÇÒ·µ»ØÊÜÓ°Ïì¼Ç¼Êý
* (3) ÅäÖÃÁ¬½ÓORACLEµÄodbcÊý¾ÝÔ´ora
*/ ......

ORACLEµÄJOB´´½¨

ORACLEµÄJOB´´½¨£¬¿ÉϧµÄÊDz»ÄܸÄÃû£¬Ö»ÄÜÊÇÊý×ÖµÄÃû×Ö¡£
DECLARE X NUMBER;
BEGIN
  SYS.DBMS_JOB.SUBMIT
  ( job       => X
   ,what      => 'compile_invalid_object;'
   ,next_date => to_date('20-04-2010 ......

OracleÎÂÏ°ÓëÈëÃÅ

SQL Server¿ª·¢ÕßOracle¿ìËÙÈëÃÅ http://kb.cnblogs.com/a/853694 ¼òµ¥¸ÅÄîµÄ½éÉÜ 1. Á¬½ÓÊý¾Ý¿â
S:    use mydatabase
O:    connect username/password@DBAlias
       conn username/password@DBAlias 2. ÔÚOracleÖÐʹÓÃDual, DualÊÇO ......

Ïê½âLinuxÏÂOracleµÄ¾²Ä¬°²×°


ÔÚijЩÌØÊâµÄÇé¿öÏ£¬ÈçÒòΪÍøÂç»òÕßXÅäÖõĹØϵÎÞ·¨Á¬½Óµ½X server»òÕßÖ÷»úÉÏûÓÐX£¬¾Í¿ÉÒÔʹÓþ²Ä¬°²×°µÄ·½Ê½°²×°Êý¾Ý¿â£¬Í¬ÑùÈç¹ûÐèÒª´ó¹æÄ£²¿Êð£¬Ôò¾²Ä¬°²×°½«»á´ó´ó¼õÇáDBAµÄÖظ´ÀͶ¯Á¦£¬¶øÇÒ¾²Ä¬°²×°²»ÐèÒªX£¬´Ó°²×°Ð§ÂÊ  
ÔÚijЩÌØÊâµÄÇé¿öÏ£¬ÈçÒòΪÍøÂç»òÕßXÅäÖõĹØϵÎÞ·¨Á¬½Óµ½X server»òÕßÖ÷»úÉÏûÓÐX£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ