oracle·Ö×é rollup,Cube
CUBE ºÍ ROLLUP Ö®¼äµÄÇø±ðÔÚÓÚ£º
CUBE Éú³ÉµÄ½á¹û¼¯ÏÔʾÁËËùÑ¡ÁÐÖÐÖµµÄËùÓÐ×éºÏµÄ¾ÛºÏ¡£
ROLLUP Éú³ÉµÄ½á¹û¼¯ÏÔʾÁËËùÑ¡ÁÐÖÐÖµµÄijһ²ã´Î½á¹¹µÄ¾ÛºÏ¡£
OracleµÄGROUP BYÓï¾ä³ýÁË×î»ù±¾µÄÓï·¨Í⣬»¹Ö§³ÖROLLUPºÍCUBEÓï¾ä¡£Èç¹ûÊÇROLLUP(A, B, C)µÄ»°£¬Ê×ÏÈ·Ö³ÉÁ½´ó²½£º£¨1£©¶ÔÓÚ·ûºÏÌõ¼þµÄÿ¸öA£¬ÏȶÔ(A¡¢B¡¢C)½øÐÐGROUP BY£¬È»ºó¶Ô(A¡¢B)½øÐÐGROUP BY£¬È»ºóÊÇ(A)½øÐÐGROUP BY£»£¨2£©¶ÔÈ«±í½øÐÐGROUP BY²Ù×÷¡£
°´CB,GDM,CZJMͳ¼Æ
SELECT CB,GDM,CZJM,COUNT(*)
from LTJ_DDC
GROUP BY ROLLUP(CB,GDM,CZJM)
Èç¹ûÊÇGROUP BY CUBE(A, B, C)£¬(1)ÏȶÔÈ«±í½øÐÐͳ¼Æ£»£¨2£©ÔòÊ×ÏȶÔ(C)½øÐÐGROUP BY£»£¨3£©È»ºóÒÀ´ÎÊǶÔÓÚÿһ¸öB£¬ÏÈͳ¼ÆB,ÔÙͳ¼Æ£¨B,C£©£»£¨4£©¶Ôÿ¸öA£¬°´£¨A£©¡¢£¨A,C£©¡¢(A,B)¡¢£¨A,B,C£©½øÐмìË÷¡£ÊµÀýÈçÏ£º
SELECT CB,GDM,CZJM,COUNT(*)
from LTJ_DDC
GROUP BY CUBE(CB,GDM,CZJM)
Ïà¹ØÎĵµ£º
ÔÚwindows ÏÂÅäÖÃPHPʹÓÃORACLEÊý¾Ý¿âÒªµã
ÔÚwindowÏ£¬¾³£ÓÃapache + PHP À´×öÓ¦ÓÃƽ̨£¬µ«ÊÇÈç¹ûʹÓÃoracle×öºǫ́Êý¾Ý¿â£¬µ«ÓÖûÓа²×°ÓÐoracle¿Í»§¶Ë£¬ÏÂÃæµÄÅäÖÿÉÒԲο¼
1¡¢ÔÚûÓа²×°oracleµÄ»úÆ÷ÉÏ£¬PHPÎÞ·¨¼ÓÔØphp_oci8.dllÄ£¿é£¬ÔÒòÊÇphp_oci8.dllÒÀÀµµÄÏà¹Ø×é¼þûÓÐÕÒµ½¡£
ÄãÕýÈ·ÉèÖÃÁË ......
רÓ÷þÎñÆ÷£ºÒ»¸ö¿Í»§¶ËÁ¬½Ó¶ÔÓ¦Ò»¸ö·þÎñÆ÷½ø³Ì
¹²Ïí·þÎñÆ÷£º¶à¸ö¿Í»§¶ËÁ¬½Ó¶ÔÓ¦Ò»¸ö·þÎñÆ÷½ø³Ì£¬·þÎñÆ÷¶Ë´æÔÚÒ»¸ö½ø³Ìµ÷¶ÈÆ÷À´¹ÜÀí¡£
OracleȱʡÓõÄÊÇרÓ÷þÎñÆ÷ģʽ£¬Oracle¿ÉÒÔͬʱ֧³Ö¹²Ïí·þÎñÆ÷ºÍרÓ÷þÎñÆ÷ģʽ£¬¿ÉÒÔÖ¸¶¨Ò»¸ö»á»°Ê¹ÓÃרÓ÷þÎñÆ÷£¬ÁíÒ»¸ö»á»°Ê¹Óù²Ïí·þÎñÆ÷¡£
¹²Ïí·þÎñÆ÷¾ßÓÐÒÔÏÂһЩȱµã£º
1)¹² ......
1. ½«Êý¾Ý¿âÍêÈ«µ¼³ö
Óû§Ãûsystem ÃÜÂësystem µ¼³öµ½OracleÓû§Ä¿Â¼ÏµÄtestdb20100522.dmpÎļþÖÐ
#exp system/system@testdb file=testdb20100522.dmp full=y
2. ½«Êý¾Ý¿âÖÐsystemÓû§ÓësysÓû§µÄ±íµ¼³ö
#exp system/system@testdb file= testdb20100522.d ......
1import java.sql.*;
2import java.util.logging.Level;
3import java.util.logging.Logger;
4
5/** *//**
6 * Title: JDBCÁ¬½ÓÊý¾Ý¿â
7 * Description: ±¾ÊµÀýÑÝʾÈçºÎʹÓÃJDBCÁ¬½ÓOracleÊý¾Ý¿â£¬²¢ÑÝʾÌí¼ÓÊý¾ÝºÍ²éѯÊý¾Ý.
8 */
9public class JDBCExampl ......
Ò»¡¢ Hibernate½éÉÜ
HibernateÊÇ»ùÓÚ¶ÔÏó/¹ØϵӳÉ䣨ORM£¬Object/Relational Mapping£©µÄÒ»¸ö½â¾ö·½°¸¡£ORM·½°¸µÄ˼ÏëÊǽ«¶ÔÏóÄ£ÐͱíʾµÄ¶ÔÏóÓ³Éäµ½¹ØϵÐÍÊý¾Ý¿âÖУ¬»òÕß·´Ö®¡£HibernateÄ¿Ç°ÊÇORM˼ÏëÔÚJavaÖÐ×î³É¹¦¡¢×îÇ¿´óµÄʵÏÖ¡£ËüÓÚ2001ÄêµÄÄêÄ©·¢²¼µÚÒ»¸ö°æ±¾£¬Á¢¼´ÒýÆðÁ˹㷺µÄ×¢Òâ¡£2003Äê6Ô£ ......