- ©«¤l
- 13
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 50
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- EXCEL2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-2-13
- ³Ì«áµn¿ý
- 2014-10-31
|
[¤À¨É] Oracle¤¤¦sÀx¹Lµ{©MSql»y¥yªºÀu¤Æ«ÂI
¾ã²z¤å¥ó®É¡Aµo²{´X¦~«e·j¶°¨ìªº¤@¨Ç¤å¥ó¡A¥X³B¤w¤£ª¾¤F¡A¤£¹L¤º®eÆZ¨ü¥Î¡A¤À¨Éµ¹¤j®a¡C
1. ¥þªí±½´y©M¯Á¤Þ±½´y
1.1 ¤j¸ê®Æ¶qªí¾¨¶qnÁקK¥þªí±½´y¡A¥þ³¡±½´y·|«ö¶¶§Ç¨C±ø°O¿ý±½´y¡A¹ï©ó>100¸U¸ê®Æªí¼vÅT«Ü¤j¡C
1.2 Oracle¤¤³q¹LRowID³X°Ý¸ê®Æ¬O³Ì§Öªº¤è¦¡
1.3 ¹ïÄæ¦ì¶i¦æ¨ç¼ÆÂà´«¡A©ÎªÌ«e¼Ò½k¬d¸ß³£·|¾ÉPµLªkÀ³¥Î¯Á¤Þ¦Ó¶i¦æ¥þªí±½´y
1.4 ¹ïOracle¦@¥Î¦À©M½w½Ä°Ï¤¤ªºSql¥²¶·n¤j¤p¼g³£§¹¥þ¥Î¤W¤~¯à°÷¤Ç°t¤W
2 ¶¶§Ç°ÝÃD
2.1 Oracle«ö·Ó±q¥k¨ì¥ªªº¶¶§Ç¹ï¸ê®Æªí¶i¦æ¸ÑªR¡C¦]¦¹From³Ì«á±ªºªí¬°°ò¦ªí¡A¤@¯ën¿ï¾Ü°O¿ý¼Æ³Ì¤Öªºªí§@¬°°ò¦ªí¡C
2.2 ¹ï©óWhere±ø¥óªº¶¶§Ç¡A¹LÂo¨ì³Ì¤j¬d¸ß°O¿ý¼Æ¶qªº±ø¥ó¥²¶·¼g¦bWhere±ø¥óªºµ²§À³B¡C
2.3 Where±ø¥ó¤¤¯A¤Î¨ì¨Ï¥Î½ÆÂø¨ç¼Æ§P©wªº¥²¶·ª`·Nn¼g¨ìWhere±ø¥óªº³Ì«e±
3 ¯Á¤Þ¤è±
3.1 °O¿ý¼Æ¤Öªºªí«O¯d¦³¥DÁä¯Á¤Þ´N¥i¥H¤F¡A¤£n¦A¥h«Ø¨ä¥L¯Á¤Þ¡A¥þªí±½´y¤]«Ü§Ö
3.2 ¯Á¤Þ³Ì¦n³æ¿W«Ø¥ßªíªÅ¶¡¡A¥²n®ÉÔ¹ï¯Á¤Þ¶i¦æ««Ø
3.3 ¥²n®ÉÔ¥i¥H¨Ï¥Î¨ç¼Æ¯Á¤Þ¡A¦ý¤£±ÀÂ˨ϥÎ
3.4 Oracle¤¤ªºµø¹Ï¤]¥i¥H¼W¥[¯Á¤Þ¡A¦ý¤@¯ë¤£±ÀÂ˨ϥÎ
3.5 *Sql»y¥y¤¤¤j¶q¨Ï¥Î¨ç¼Æ®ÉÔ·|¾ÉP«Ü¦h¯Á¤ÞµLªk¨Ï¥Î¤W¡An°w¹ï¨ãÅé°ÝÃD¤ÀªR
4 ¨ä¥L
4.1 ÁקK¨Ï¥ÎSelect *,¦]¬°¨t²Î»Ýn¥hÀ°§A±N*Âà´«¬°©Ò¦³ªº¦C¦W¡A³oÓ»ÝnÃB¥~¥h¬d¸ß¸ê®Æ¦r¨å¡C
4.2 Count(1)©MCount(*)®t§O¤£¤j¡C
4.3 ¦h¨Ï¥ÎDecode¨ç¼Æ¨Ó§@²³æªº¥N½X©M¦WºÙ¶¡ªºÂà´«¡A¥H´î¤ÖªíÃöÁp
4.4 ¨Ï¥ÎTruncate´À¥Ndelete¨Ó§R°£°O¿ý¡A¦ýTruncate¸ê®Æ¤£°O¿ý¤é»x¡AµLªk¶i¦æ¦^ºu
4.5 ¹ï©ó½ÆÂøªº¦sÀx¹Lµ{¥i¥H¦h¦¸´£¥æªº¸ê®Æªºn¦h¤À¦h¦¸Commit¡A§_«hªø¨Æ°È¹ï¨t²Î©Ê¯à¼vÅT«Ü¤j
4.6 Distinct©MHaving¤l¥y³£¬O¯Ó®É¾Þ§@¡AÀ³¸ÓºÉ¥i¯à¤Ö¨Ï¥Î
4.7 ¦b¤£»Ýn¦Ò¼{«½Æ°O¿ý¦X¨Ö®ÉÔ¥ÎUnion All¨Ó¥N´ÀUnion
4.8 ¨Ï¥ÎÅã©Ê´å¼Ð¦Ó¤£¨Ï¥ÎÁô©Ê´å¼Ð¡A¯S§O¬O¤j¸ê®Æ¶q±¡ªp¤UÁô©Ê´å¼Ð¹ï©Ê¯à¼vÅT«Ü¤j
4.9 ¬O§_¨Ï¥Î¨ç¼Æªº°ÝÃD
4.10 ¥Îª½±µªºªíÃöÁp¨Ó¥N´ÀExist.¥ÎExist©ÎNot Exists¨Ó¥N²zIn¡CIn¶i¦æ¤l¬d¸ß®Ä²v«Ü®t¡C
5 SQL»y¥y¤ÀªR
5.1 ³q¹LSQLPLUS¤¤ªºSET TRACE ¥\¯à¹ïSql»y¥yªº©Ê¯à¶i¦æ¤ÀªR
5.2 ³q¹LToad©ÎPL/SQL Developer¹ï»y¥yªº©Ê¯à¶i¦æ©M¯Á¤Þªº¨Ï¥Î±¡ªp¶i¦æ¤ÀªR
5.3 ¹ïOracle¯Ê¬ÙªºÀu¤Æ¤£º¡·N¥i¥H±j¨î¨Ï¥ÎHint¡A¦ý¤@¯ë¤£±ÀÂ˨ϥÎ
5.4 ¹ïFlagµ¥¥u¦sÀx¬O©Î§_¸ê°TªºÄæ¦ì¡A¤@¯ë¤£±ÀÂ˫إ߯Á¤Þ¡C¥²n¥i¥H±Ä¥ÎÂI°}¹Ï¯Á¤Þ
5.5 *¦s¦b»¼°j¬d¸ß±¡ªp¦pªGÃöÁpTable¤Ó¦h¹ï©Ê¯à·|³y¦¨¸û¤j¼vÅT¡A©¹©¹±ÀÂ˱ĥÎÁ{®ÉªíÂର¤À¨BÆJ¾Þ§@´£°ª©Ê¯à
5.6 *¾¨¶q¨Ï¥ÎªíÃöÁp¬d¸ß¦Ó¤£¨Ï¥Î¨ç¼Æ¡A¦ý¯A¤ÎÃþ¦ü©ó¥N½Xªín«½ÆÃöÁp¦h¦¸¨ú¸ê®Æ°ÝÃD®ÉÔ¤S¾A¦X¨Ï¥Î¨ç¼Æ |
|