ITPUB??ì3
12月微软Hyper-V虚拟化沙龙主题征集
ITPUB论坛 » Oracle开发 » 有关Base Scalar Datatypes的区分和使用

标题: 有关Base Scalar Datatypes的区分和使用
离线 surf
初级会员


精华贴数 0
个人空间 0
技术积分 42 (31462)
社区积分 1 (33463)
注册日期 2002-3-17
论坛徽章:0
      
      

发表于 2002-3-27 18:09 
有关Base Scalar Datatypes的区分和使用

各位前辈:
1、varchar2类型是否比long类型的数据长呀?
2、binary_integer和pls_integer的区别在哪里呀?具体怎么使用呢?
有好的建议吗?
谢谢!


__________________
I hope your idea takes wing. I'd do anything to see you crack a smile.
只看该作者    顶部
离线 jlandzpa
版主


精华贴数 29
个人空间 0
技术积分 45963 (15)
社区积分 53595 (10)
注册日期 2001-10-12
论坛徽章:16
现任管理团队成员ITPUB元老授权会员生肖徽章2007版:牛ITPUB新首页上线纪念徽章 
      

发表于 2002-3-27 18:32 
in 8i

Name  Code  Description  
CHAR  
96  
<= 2000-byte, fixed-length string  

NCHAR  
96  
<= 2000-byte, fixed-length single-byte or fixed-width multi-byte string  

DATE  
12  
7-byte, fixed-length date/time value  

LONG  
8  
<= 2147483647-byte, variable-length string  

LONG RAW  
24  
<= 2147483647-byte, variable-length binary data  

NUMBER  
2  
fixed or floating point number, represented in binary coded decimal format  

RAW  
23  
<= 255-byte, variable-length binary data  

ROWID  
11  
fixed-length binary value  

VARCHAR2  
1  
<= 4000-byte, variable-length string  

NVARCHAR2  
1  
<= 4000-byte, variable-length single-byte or fixed-width multi-byte string


__________________
my blog: http://blog.itpub.net/jlandzpa
mail: “id”@itpub.net

注意: [投资理财版] 业已提供上证指数菠菜,欢迎参与 :)

[头像] 黑木明纱 Meisa Kuroki  :)
只看该作者    顶部
离线 jlandzpa
版主


精华贴数 29
个人空间 0
技术积分 45963 (15)
社区积分 53595 (10)
注册日期 2001-10-12
论坛徽章:16
现任管理团队成员ITPUB元老授权会员生肖徽章2007版:牛ITPUB新首页上线纪念徽章 
      

发表于 2002-3-27 18:34 
BINARY_INTEGER
You use the BINARY_INTEGER datatype to store signed integers. Its magnitude range is -2147483647 .. 2147483647. Like PLS_INTEGER values, BINARY_INTEGER values require less storage than NUMBER values. However, most BINARY_INTEGER operations are slower than PLS_INTEGER operations.

PLS_INTEGER
You use the PLS_INTEGER datatype to store signed integers. Its magnitude range is -2147483647 .. 2147483647. PLS_INTEGER values require less storage than NUMBER values. Also, PLS_INTEGER operations use machine arithmetic, so they are faster than NUMBER and BINARY_INTEGER operations, which use library arithmetic. For better performance, use PLS_INTEGER for all calculations that fall within its magnitude range.

Although PLS_INTEGER and BINARY_INTEGER have the same magnitude range, they are not fully compatible. When a PLS_INTEGER calculation overflows, an exception is raised. However, when a BINARY_INTEGER calculation overflows, no exception is raised if the result is assigned to a NUMBER variable.

Because of this small semantic difference, you might want to continue using BINARY_INTEGER in old applications for compatibility. In new applications, always use PLS_INTEGER for better performance.


__________________
my blog: http://blog.itpub.net/jlandzpa
mail: “id”@itpub.net

注意: [投资理财版] 业已提供上证指数菠菜,欢迎参与 :)

[头像] 黑木明纱 Meisa Kuroki  :)
只看该作者    顶部
离线 surf
初级会员


精华贴数 0
个人空间 0
技术积分 42 (31462)
社区积分 1 (33463)
注册日期 2002-3-17
论坛徽章:0
      
      

发表于 2002-3-27 19:25 
clearness!
Tks a lot
:〉


__________________
I hope your idea takes wing. I'd do anything to see you crack a smile.
只看该作者    顶部
 
    

相关内容


CopyRight 1999-2006 itpub.net All Right Reserved.
北京皓辰广域网络信息技术有限公司. 版权所有
E-mail:Webmaster@itpub.net
京ICP证:010037号 联系我们 法律顾问