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

Oracle,MySQL,MSSQL ServerºÍAccessÊý¾Ý¿âµÄͳ¼Æº¯Êý

Oracle,MySQL,MSSQL ServerºÍAccessÊý¾Ý¿âµÄͳ¼Æº¯Êý
ÎÒÃÇÔÚ±à³ÌÖг£ÓõÄͳ¼Æº¯ÊýÓмÆÊý,ÇóºÍ,Çó×î´óÖµ,Çó×îСֵ,Çóƽ¾ù,·½²îºÍ±ê×¼²î.
·½²î(Variance)
·½²îÊDZê׼ƫ²îµÄƽ·½¡£×éÖеÄÖµ£¬ÓëËüÃÇƽ¾ùÖµÖ®¼äÆ«Àë³Ì¶ÈµÄ¶ÈÁ¿¡£
±ê׼ƫ²î(Standard Deviation)
Ò»¸ö²ÎÊý£¬Ö¸³öÒ»ÖÖ·½Ê½£¬Ò»¸ö¸ÅÂʺ¯ÊýÒÔÕâÖÖ·½Ê½·Ö²¼ÔÚƽ¾ùÖµ¸½½ü£¬¶øƽ¾ùֵΪ·½²îµÄƽ·½¸ù¡£
ÓÃÀ´ÃèÊöÊýÖµ¼¯ºÏ£¬¼ÆËãÓëËãÊõ¾ùÖµ»òƽ¾ùÖµÖ®¼äµÄ²îÒì¡£
SQLÓï¾äÖеĺ¯ÊýÊDz»·Ö´óСдµÄ¡£
1¡¢COUNT
»ñµÃ¼Ç¼Êý
ËÄÖÖÊý¾Ý¿â¶¼Ò»Ñù,Ó÷¨ÈçÏÂ:
COUNT (*) ·µ»ØÌõ¼þ²éѯ½á¹ûÖÐËùÓмǼµÄÊýÁ¿.
COUNT (ALL expression) ¶Ô×éÖеÄÿһÐж¼¼ÆËã expression ²¢·µ»Ø·Ç¿ÕÖµµÄÊýÁ¿¡£
COUNT (DISTINCT expression) ¶Ô×éÖеÄÿһÐж¼¼ÆËã expression ²¢·µ»ØΨһ·Ç¿ÕÖµµÄÊýÁ¿¡£
2¡¢AVG
ƽ¾ùÖµ
ËÄÖÖÊý¾Ý¿âµÄÓ÷¨Óе㲻һÑù.
AccessºÍMySQL²»Ö§³ÖAVG(distinct expression)²Ù×÷,¶øOracleºÍMS SQL ServerÊÇÖ§³ÖµÄ.
3¡¢MIN, MAX
·Ö±ð·µ»Ø±í´ïʽÖеÄ×îСºÍ×î´óÖµ
ËÄÖÖÊý¾Ý¿âÇø±ð¸úÉÏÃæAVGº¯ÊýÒ»Ñù.
4¡¢Sum
ÇóºÍ
Ó÷¨ÓÐÇø±ð,Ò²ÊÇAccessºÍMySQL²»Ö§³Ö´ødistinctµÄ±í´ïʽÓ÷¨.
5¡¢±ê׼ƫ²îº¯Êý:
ËÄÖÖÊý¾Ý¿âµÄ²î±ð¸ü´óÁË,ÔںܶàµØ·½Ò²ÊDz»ÏàͬµÄ£º
²úÆ·
×ÜÌåÆ«²î
³éÑùÆ«²î
Ó÷¨
˵Ã÷
Access
StDevP()
StDev()
À¨ºÅÖÐÓÃ×Ö¶ÎÃû»òÕß×Ö¶ÎÔËËã±í´ïʽ
²»Ö§³Ö±í´ïʽǰ¼Ódistinct,PÊÇPopulation¡£
MS SQL Server
ͬÉÏ
ͬÉÏ
ͬÉÏ
Ö§³Ö±í´ïʽǰ¼Ódistinct
Oracle
StdDev_Pop()
StdDev()
StdDev_Samp()
ͬÉÏ
Ö§³Ö±í´ïʽǰ¼Ódistinct
MySQL
5.0.3°æÒÔÇ°
Std()
StdDev()
5.0.3°æÒÔºó,¼ÓÈëSTDDEV_POP()
5.0.3°æÒÔÇ°
ÎÞ
5.0.3°æÒÔºó¼ÓÈëSTDDEV_SAMP()
ͬÉÏ
²»Ö§³Ö±í´ïʽǰ¼Ódistinct
6¡¢·½²îº¯Êý:
²úÆ·
×ÜÌåÆ«²î
³éÑùÆ«²î
Ó÷¨
˵Ã÷
Access
VarP()
Var()
À¨ºÅÖÐÓÃ×Ö¶ÎÃû»òÕß×Ö¶ÎÔËËã±í´ïʽ
²»Ö§³Ö±í´ïʽǰ¼Ódistinct
MS SQL Server
ͬÉÏ
ͬÉÏ
ͬÉÏ
Ö§³Ö±í´ïʽǰ¼Ódistinct
Oracle
Var_pop()
var_samp()
variance
ͬÉÏ
Ö§³Ö±í´ïʽǰ¼Ódistinct
MySQL
4.1°æÒÔÇ°
ûÓÐ
5.0.3°æÒÔºó,¼ÓÈëVAR_POP()
5.0.3°æÒÔÇ°
ÎÞ
5.0.3°æÒÔºó¼ÓÈëVAR_SAMP()
ͬÉÏ
²»Ö§³Ö±í´ïʽǰ¼Ódistinct
¡¡¡¡ÎªÁ˸ü¸ßЧµØ²Ù×÷Êý¾Ý¿â£¬ÎÒÃÇÍùÍù¶¼Òª½èÖúÓÚһЩ²Ù×÷¹¤¾ß¡£ÔÚAccessÖУ¬µ±È»¾ÍÊÇÆä±¾ÉíÁË£¬¶øÔÚSQL ServerÖУ¬¿ÉÒÔÓÃÆóÒµ¹ÜÀíÆ÷ºÍ²éѯ·ÖÎöÆ÷À´Íê³ÉÄãÏëÒªÍê³ÉµÄ¹¤×÷£¬¶ÔÓ


Ïà¹ØÎĵµ£º

ÔÚubuntu Ï°²×°Oracle 11g

root@hardy:~# cd /bin
root@hardy:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-04-28 19:59 /bin/sh -> dash
root@hardy:/bin# ln -sf bash /bin/sh
root@hardy:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-05-01 22:51 /bin/sh -> bash
# echo "Red Hat Linux release 4" > /etc/redhat- ......

oracle ÐÞ¸Ä×Ö¶ÎÀàÐ͵ķ½·¨

½ñÌ칫˾ÒòΪҵÎñÐèÒª,ÐÞÒªÐÞ¸Äij¸ö×Ö¶ÎÊý¾ÝÀàÐÍÓÐnumber(5),±äΪnumber(5,2)ÐÍ
ÒªÊÇûÓÐÊý¾ÝµÄ»°Ö±½ÓÓÃÒÔÏÂÓï¾ä¼´¿É
alter   table  tb_test  modify permile  number(5,2);
µ«ÊÇÓÐÊý¾ÝµÄ»° ¾Í²»ÄÜÓÃÉÏÃæ·½·¨ÁË,
alter table tb_test add permile_temp number(5,2)
update tb_test set  ......

Oracle 10G Êý¾Ý¿âÎļþĿ¼½á¹¹

ÔÚOracle Database 10gÖÐ,OracleµÄĿ¼½á¹¹ÊÇÓÉOracle_Base¼°Æä×ÓĿ¼Oracle_Home¡¢admin¡¢flash_recovery_areaºÍoradataĿ¼¹¹³ÉµÄ¡£Îª·½±ãÌÖÂÛ£¬ÓÃOracle_Base´ú±íOracleĿ¼Ê÷µÄ¸ù£¬ÓÃOracle_Home±íʾ¸ùĿ¼ÏµÄÖ÷Ŀ¼¡£
1.Oracle_BaseĿ¼
Oracle_Base´ú±íOracleĿ¼Ê÷µÄ¸ù¡£Èç¹ûʹÓÃOracle Universal Installer½øÐ ......

oracleÊ÷ÖÐpriorµÄÓ÷¨

Êý¾Ý˵Ã÷Ò»ÇУº
create table dept(deptno number,deptname varchar2(20),mgrno number);
insert into dept values (1, '×ܹ«Ë¾', null);
insert into dept values (2, 'Õã½­·Ö¹«Ë¾', 1);
insert into dept values (3, 'º¼ÖÝ·Ö¹«Ë¾', 2);
commit;
select t.* from dept t;
      DEPTNO &n ......

InnoDB»¹ÊÇMyISAM ÔÙ̸MySQL´æ´¢ÒýÇæµÄÑ¡Ôñ

Á½ÖÖÀàÐÍ×îÖ÷ÒªµÄ²î±ð¾ÍÊÇInnodb Ö§³ÖÊÂÎñ´¦ÀíÓëÍâ¼üºÍÐм¶Ëø.¶øMyISAM²»Ö§³Ö.ËùÒÔMyISAMÍùÍù¾ÍÈÝÒ×±»ÈËÈÏΪֻÊʺÏÔÚСÏîÄ¿ÖÐʹÓá£
ÎÒ×÷ΪʹÓÃMySQLµÄÓû§½Ç¶È³ö·¢£¬InnodbºÍMyISAM¶¼ÊDZȽÏϲ»¶µÄ£¬µ«ÊÇ´ÓÎÒÄ¿Ç°ÔËάµÄÊý¾Ý¿âƽ̨Ҫ´ïµ½ÐèÇó£º99.9%µÄÎȶ¨ÐÔ£¬·½±ãµÄÀ©Õ¹ÐԺ͸߿ÉÓÃÐÔÀ´ËµµÄ»°£¬MyISAM¾ø¶ÔÊÇÎÒµÄÊ×Ñ¡¡£
Ô­Ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ