ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ZT:字符长度与共享问题

ZT:字符长度与共享问题

原创 Linux操作系统 作者:lfree 时间:2007-04-24 00:00:00 0 删除 编辑

http://tkyte.blogspot.com/2007/04/share-and-share-alike.html

Share and Share alike...

create table t ( x varchar2(2000) );

declare
a varchar2(1) := 'x';
b varchar2(100) := rpad('x',100,'x');
c varchar2(500) := rpad('x',500,'x');
d varchar2(1000) := rpad('x',1000,'x');
begin
insert into t big_to_small values(d);
insert into t big_to_small values(c);
insert into t big_to_small values(b);
insert into t big_to_small values(a);
insert into t small_to_big values(a);
insert into t small_to_big values(b);
insert into t small_to_big values(c);
insert into t small_to_big values(d);
end;


column sql_text format a45
column address new_val ADDR
select sql_text, address, child_address
from v$sql
where sql_text like 'INSERT%INTO%T%VALUES(%:B1%)'
/

SQL_TEXT ADDRESS CHILD_ADDRESS
--------------------------------------------- ---------------- ----------------
INSERT INTO T BIG_TO_SMALL VALUES(:B1 ) 00000000CABA0820 00000000CAC197D8
INSERT INTO T SMALL_TO_BIG VALUES(:B1 ) 00000000CA7F9300 00000000D16A97A0
INSERT INTO T SMALL_TO_BIG VALUES(:B1 ) 00000000CA7F9300 00000000D1A477A0
INSERT INTO T SMALL_TO_BIG VALUES(:B1 ) 00000000CA7F9300 00000000D155C0B8


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/267265/viewspace-83011/,如需转载,请注明出处,否则将追究法律责任。

下一篇: 十大垃圾食品
请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    2285
  • 访问量
    6024705