oracleÖеÄdual±íÏê½â
1.DUAL±íµÄÓÃ;
Dual ÊÇ OracleÖеÄÒ»¸öʵ¼Ê´æÔÚµÄ±í£¬ÈκÎÓû§¾ù¿É¶ÁÈ¡£¬³£ÓÃÔÚûÓÐÄ¿±ê±íµÄSelectÓï¾ä¿éÖÐ
--²é¿´µ±Ç°Á¬½ÓÓû§
SQL> select user from dual;
USER
------------------------------
SYSTEM
--²é¿´µ±Ç°ÈÕÆÚ¡¢Ê±¼ä
SQL> select sysdate from dual;
SYSDATE
-----------
2007-1-24 1
SQL> select to_char(sysdate,''yyyy-mm-dd hh24:mi:ss'') from dual;
TO_CHAR(SYSDATE,''YYYY-MM-DDHH2
------------------------------
2007-01-24 15:02:47
--µ±×÷¼ÆËãÆ÷ÓÃ
SQL> select 1+2 from dual;
1+2
----------
3
--²é¿´ÐòÁÐÖµ
SQL> create sequence aaa increment by 1 start with 1;
SQL> select aaa.nextval from dual;
NEXTVAL
----------
1
SQL> select aaa.currval from dual;
CURRVAL
----------
1
2¡¢¹ØÓÚDUAL±íµÄ²âÊÔÓë·ÖÎö
DUAL¾ÍÊǸöÒ»ÐÐÒ»ÁÐµÄ±í£¬Èç¹ûÄãÍùÀïÖ´ÐÐinsert¡¢delete¡¢truncate²Ù×÷£¬¾Í»áµ¼Öºܶà³ÌÐò³öÎÊÌâ¡£½á¹ûÒ²Òòsql*plus¡¢pl/sql devµÈ¹¤¾ß¶øÒì¡£
--²é¿´DUALÊÇʲôOBJECT
--DUALÊÇÊôÓÚSYS schemaµÄÒ»¸ö±í,È»ºóÒÔPUBLIC SYNONYMµÄ·½Ê½¹©ÆäËûÊý¾Ý¿âUSERʹÓÃ.
SQL> select owner, object_name , object_type from dba_objects where object_name like ''%DUAL%'';
OWNER OBJECT_NAME OBJECT_TYPE
---------- ----------------- ------------------
SYS DUAL TABLE
PUBLIC DUAL SYNONYM
--²é¿´±í½á¹¹£¬Ö»ÓÐÒ»¸ö×Ö¶ÎDUMMY£¬ÎªVARCHAR2(1)ÐÍ
SQL> desc dual
Name Type Nullable Default Comments
----- ----------- -------- ------- --------
DUMMY VARCHAR2(1) Y
--DUAL±íµÄ½á¹¹£º
create table SYS.DUAL
(
DUMMY VARCHAR2(1)
)
tablespace SYSTEM
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 16K
next 16K
minextents 1
maxextents 505
pctincrease 50
);
/*
ºÜÊÇÀ§»ó£¬ORACLEΪʲôҪÓÃVARCHAR(1)ÐÍ£¬ÓÃCHAR(1)ÄѵÀ²»ºÃô£¿´ÓÕâÑùµÄ±í½á¹¹À´¿´£¬DUAL±íÉè¼ÆµÄÄ¿µÄ¾ÍÊÇÒª¾¡¿ÉÄܵļòµ¥£¬ÒÔ¼õÉÙ¼ìË÷µÄ¿ªÏú¡£
»¹ÓУ¬DUAL±íÊǽ¨Á¢ÔÚSYSTEM±í¿Õ¼äµÄ£¬µÚÒ»ÊÇÒòΪDUAL±íÊÇSYSÕâ¸öÓû§½¨µÄ£¬±¾À´Ä¬Èϵıí¿Õ¼ä¾ÍÊÇSYSTEM£»µÚ¶þ£¬°ÑÕâ¸ö¿ÉÄܾ³£±»²éѯµÄ±íºÍÓû§±í·Ö¿ªÀ´´æ·Å£¬¶ÔÓÚϵͳÐÔÄܵÄÊÇÓкô¦µÄ¡£
ÓÐÁË´´½¨ÁË±í¡¢´´½¨ÁËͬÒå´Ê
Ïà¹ØÎĵµ£º
µ±OracleµÄ¶à¸ö´æ´¢¹ý³Ì¶¼Ê¹Óù«¹²µÄ³£Á¿Ê±£¬ÎÒÃÇ¿ÉÒÔ½¨Ò»¸öרÃŵÄpackageÓÃÀ´¹ÜÀíËùÓеij£Á¿¡£¶¨ÒåµÄʾÀý´óÖÂÈçÏ£º¡¡
create or replace package GLOBAL_CONSTANT is
/*ÊýÖµÀà³£Á¿*/
/*±ÈÂÊ*/
rate_tax CONSTANT NUMBER := 1.17; -- ˰ÂÊ   ......
ÔÚoracleÖÐÅúÁ¿Êý¾ÝµÄµ¼³öÊǽèÖúsqlplusµÄspoolÀ´ÊµÏֵġ£ÅúÁ¿Êý¾ÝµÄµ¼ÈëÊÇͨ¹ýsqlloadÀ´ÊµÏֵġ£
´óÁ¿Êý¾ÝµÄµ¼³ö²¿·ÖÈçÏ£º
/***************************
* sql½Å±¾²¿·Ö demo.sql begin
**************************/
/**************************
* @author meconsea
* @date 20050 ......
ORACLEµÄ·ÖÇø(Partitioning Option)ÊÇÒ»ÖÖ´¦Àí³¬´óÐͱíµÄ¼¼Êõ¡£·ÖÇøÊÇÒ»ÖÖ“·Ö¶øÖÎÖ®”µÄ¼¼Êõ£¬Í¨¹ý½«´ó±íºÍË÷Òý·Ö³É¿ÉÒÔ¹ÜÀíµÄС¿é£¬´Ó¶ø±ÜÃâÁ˶Ôÿ¸ö±í×÷Ϊһ¸ö´óµÄ¡¢µ¥¶ÀµÄ¶ÔÏó½øÐйÜÀí£¬Îª´óÁ¿Êý¾ÝÌṩÁË¿ÉÉìËõµÄÐÔÄÜ¡£·ÖÇøÍ¨¹ý½«²Ù×÷·ÖÅ䏸¸üСµÄ´æ´¢µ¥Ôª£¬¼õÉÙÁËÐèÒª½øÐйÜÀí²Ù×÷µÄʱ¼ä£¬²¢Í¨¹ýÔöÇ¿µÄ²¢Ðд ......
¿ª·ÅÐÔ ¡¡¡¡SQL Server
¡¡¡¡Ö»ÄÜÔÚWindows ÉÏÔËÐУ¬Ã»ÓÐË¿ºÁµÄ¿ª·ÅÐÔ£¬²Ù×÷ϵͳµÄϵͳµÄÎȶ¨¶ÔÊý¾Ý¿âÊÇÊ®·ÖÖØÒªµÄ¡£Windows9XϵÁвúÆ·ÊÇÆ«ÖØÓÚ×ÀÃæÓ¦Óã¬NT serverÖ»ÊʺÏÖÐСÐÍÆóÒµ¡£¶øÇÒWindowsƽ̨µÄ¿É¿¿ÐÔ£¬°²È«ÐÔºÍÉìËõÐÔÊǷdz£ÓÐÏ޵ġ£Ëü²»ÏóUnixÄÇÑù¾Ã¾¿¼Ñ飬ÓÈÆäÊÇÔÚ´¦Àí´óÊý¾ÝÁ¿µÄ¹Ø¼üÒµÎñʱ¡£
¡¡¡¡Oracle
......
ÔÚ¿ª·¢¹ý³Ì³öÏÖÕâôһ¸öÎÊÌ⣺
±ÈÈ磺һ¸ö×Ö¶Îcontent ÀàÐÍCLOB£¬ÕâÆäÖдæµÄÓпÉÄܸ´ÖÆÕ³Ìù¹ýÀ´µÄword excel htmlÖеÄÄÚÈÝ£¬ÓÃjava½«ÕâЩÄÚÈÝ´æÈ룬´æÈëºóÓÐÌØÊâµÄ·ûºÅ ±ÈÈç»Ø³µ»»Ðеȡ£ÄÇô²»ÄÜÕý³£Õ¹Ê¾µÄÊý¾Ý¡£
½â¾ö·½°¸£º
´æÈëÊý¾ÝµÄÊǽ«Õâ¸öÊý¾ÝcontentdataÔÚjsÖнøÐÐ
......