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

Oracle×Ö·û´®³¤¶ÈµÄÎÊÌâ

    ½ñÌìÅöµ½Ò»¸öÎÊÌ⣬ͨ¹ýÒ»¸öSQLÓï¾ä²éѯʱ£¬³öÈçÏÂÎÊÌ⣺
       ORA-06502: PL/SQL: numeric or value error: character string buffer too small
       ORA-06512: at "WMSYS.WM_CONCAT_IMPL", line 30
 ÎÊÌâ³öÏÖÔÚͨ¹ýWMSYS.WM_CONCAT_IMPLº¯ÊýÖØÐÂ×é×°×Ö·û´®µÄʱºò£¬×é×°µÄ´®¹ý³¤£¬varchar2ÀàÐ͵ÄÊý¾ÝÀàÐÍ×î´óΪ4000¸ö×Ö½Ú£¬ÔÚPL/SQLÖÐ×î´óΪ32767£¬Ô­Òò¾ÍÔÚÕâWMSYS.WM_CONCAT_IMPL×é×°µÄÕâ¸ö×Ö·û´®³¤¶ÈΪ18031£¬ÔÚschema¼¶ÏÂvarchar2×î´óÊÇ4000£¬³¬¹ý×î´ó³¤¶È£¬±¨´í¡£(¼ÇϸÃÎÊÌ⣬³¤¼ÇÐÔ~)
ÒÔÏÂÄÚÈÝÎª×ªÔØ£¬url£ºhttp://www.blogjava.net/wangbing/archive/2010/03/15/315482.html
¹ØÓÚ varchar2 µÄ×î´ó³¤¶È
varchar2ÓÐÁ½¸ö×î´ó³¤¶È£ºÒ»¸öÊÇÔÚ×Ö¶ÎÀàÐÍ4000£»Ò»¸öÊÇÔÚPL/SQLÖбäÁ¿ÀàÐÍ32767¡£½ñÌì·¸ÁËÒ»¸öС´íÎ󣬾ÍÊǺ¯ÊýµÄvarchar2ÀàÐ͵ķµ»ØÖµ³¤¶ÈÒ²ÊÇ4000£¬¶ø²»ÊÇÎÒÒÔΪµÄ32767¡£
 
ÏëÁËһϣ¬ÕâÊÇÒ»¸ö±È½ÏÈÝÒ׳ö´íµÄµØ·½¡£ÒòΪÔÚº¯ÊýÖÐÎÒ¿ÉÒÔÉùÃ÷³¤¶È³¬¹ý4000µÄ×Ö·û´®±äÁ¿£¬²¢ÇÒ½«Ëü×÷Ϊ·µ»ØÖµ£¬ÕâÀïÊDz»»áÌáʾ±àÒë´íÎóµÄ¡£Õâ¸öº¯Êýƽʱ¶¼¿ÉÒÔÕý³£Ö´ÐУ¬¶øÒ»µ©Õâ¸ö×Ö·û´®³¤¶È³¬¹ý4000£¬º¯ÊýÖ´Ðоͻá³ö´í¡£ËùÒÔÕâ¸öÎÊÌâËäÈ»±È½Ï¼òµ¥£¬ÈÔÈ»¼Ç¼һÏ¡£
 
C:\Documents and Settings\yuechao.tianyc>sqlplus
 
SQL*Plus: Release 10.2.0.1.0 - Production on ÐÇÆÚ¶þ 5Ô 5 17:15:59 2009
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
ÇëÊäÈëÓû§Ãû:  test/test
 
Á¬½Óµ½:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
 
SQL> create or replace function funny return varchar2
  2  is
  3    v_yct varchar2(32767);
  4  begin
  5    v_yct := rpad('a', 4001, 'b');
  6 &


Ïà¹ØÎĵµ£º

Oracleɾ³ýÖØ¸´Êý¾Ý

ÔÚ¶ÔÊý¾Ý¿â½øÐвÙ×÷¹ý³ÌÖÐÎÒÃÇ¿ÉÄÜ»áÓöµ½ÕâÖÖÇé¿ö£¬±íÖеÄÊý¾Ý¿ÉÄÜÖØ¸´³öÏÖ£¬Ê¹ÎÒÃǶÔÊý¾Ý¿âµÄ²Ù×÷¹ý³ÌÖдøÀ´ºÜ¶àµÄ²»±ã£¬ÄÇôÔõôɾ³ýÕâÐ©ÖØ¸´Ã»ÓÐÓõÄÊý¾ÝÄØ?
¡¡¡¡Öظ´Êý¾Ýɾ³ý¼¼Êõ¿ÉÒÔÌṩ¸ü´óµÄ±¸·ÝÈÝÁ¿£¬ÊµÏÖ¸ü³¤Ê±¼äµÄÊý¾Ý±£Áô£¬»¹ÄÜʵÏÖ±¸·ÝÊý¾ÝµÄ³ÖÐøÑéÖ¤£¬Ìá¸ßÊý¾Ý»Ö¸´·þÎñˮƽ£¬·½±ãʵÏÖÊý¾ÝÈÝÔֵȡ£ ÖØ¸´µÄÊý¾ ......

OracleÊý¾Ý¿â¹ÜÀí½Å±¾ËµÃ÷

author£ºskate
time£º2010-05-25
OracleÊý¾Ý¿â¹ÜÀí½Å±¾ËµÃ÷
Oracle ÖеÄÊý¾Ý×ÖµäÊÇÊý¾Ý¿âÖеķdz£ÖØÒªµÄÒ»²¿·Ö£¬ÌṩÁËÏà¹ØÊý¾Ý¿âµÄÐÅÏ¢£¬ËüÊÇËùÓÐOracleÓû§£¨´ÓÓ¦ÓõÄ×îÖÕÓû§¡¢Ó¦ÓõÄÉè¼Æ¿ª·¢Õßµ½Êý¾Ý¿â¹ÜÀíÔ±£©µÄ·Ç³£ÖØÒªµÄÐÅÏ¢À´Ô´¡£Êý¾Ý×ÖµäµÄ´´½¨£¬ÊÇÔÚOracleÊý¾Ý¿â´´½¨Íê±Ïºó£¬ÔËÐÐһЩÏà¹ØµÄÊý¾Ý¿â¹ÜÀí½Å±¾À´Íê ......

OracleºÍSQL serverµÄÊý¾ÝÀàÐͱȽÏ


ÀàÐÍÃû³Æ
Oracle
SQLServer
±È½Ï
×Ö·ûÊý¾ÝÀàÐÍ
CHAR
CHAR
¶¼Êǹ̶¨³¤¶È×Ö·û×ÊÁϵ«oracleÀïÃæ×î´ó¶ÈΪ2kb£¬SQLServerÀïÃæ×î´ó³¤¶ÈΪ8kb
±ä³¤×Ö·ûÊý¾ÝÀàÐÍ
VARCHAR2
VARCHAR
OracleÀïÃæ×î´ó³¤¶ÈΪ4kb£¬SQLServerÀïÃæ×î´ó³¤¶ÈΪ8kb
¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¹Ì¶¨³¤¶È×Ö·û´®
NCHAR
NCHAR
ǰÕß×î´ó³¤¶È2kbºóÕß×î´ó³¤¶È4 ......

ÓÃjavaµ÷ÓÃoracle´æ´¢¹ý³Ì×ܽá

ÓÃjavaµ÷ÓÃoracle´æ´¢¹ý³Ì×ܽá
1¡¢Ê²Ã´ÊÇ´æ´¢¹ý³Ì¡£´æ´¢¹ý³ÌÊÇÊý¾Ý¿â·þÎñÆ÷¶ËµÄÒ»¶Î³ÌÐò£¬ËüÓÐÁ½ÖÖÀàÐÍ¡£Ò»ÖÖÀàËÆÓÚSELECT²éѯ£¬ÓÃÓÚ¼ìË÷Êý¾Ý£¬¼ìË÷µ½µÄÊý¾ÝÄܹ»ÒÔÊý¾Ý¼¯µÄÐÎʽ·µ»Ø¸ø¿Í»§¡£ÁíÒ»ÖÖÀàËÆÓÚINSERT»òDELETE²éѯ£¬Ëü²»·µ»ØÊý¾Ý£¬Ö»ÊÇÖ´ÐÐÒ»¸ö¶¯×÷¡£ÓеķþÎñÆ÷ÔÊÐíͬһ¸ö´æ´¢¹ý³Ì¼È¿ÉÒÔ·µ»ØÊý¾ÝÓÖ¿ÉÒÔÖ´Ðж¯×÷¡£ ......

OracleµÄ»ù±¾²Ù×÷£«Oracle×Ö¶ÎÀàÐÍ£¨zz£©

ÔÚOracle¹ØÓÚʱ¼äÊôÐԵĽ¨±í
Example:
create table courses(
cid varchar(20) not null primary key,
cname varchar(20) not null,
ctype integer,
ctime date DEFAULT SYSDATE,
cscore float not null
)
insert into courses values('ss01','java',0,TO_DATE('2009-8-28','yyyy-mm-dd'),94)
insert into course ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ