Oracle 中的Interger类型

引自 wolfAone, oracle有没有integer类型,这种类型的最大值是多少啊.

Integer是Number类型的子类型:

NUMBER Type

You use the NUMBER datatype to store fixed or floating point numbers

of virtually any size.  You can specify precision, which is the total

number of digits, and scale, which determines where rounding occurs.

The syntax follows:

NUMBER[(precision, scale)]

You cannot use constants or variables to specify precision and scale;

you must use integer literals.  The maximum precision of a NUMBER value

is 38; the magnitude range is 1.0E-129 .. 9.99E125.  If you do not

specify the precision, it defaults to the maximum value supported by

your system.

Scale can range from -84 to 127.  For instance, a scale of 2 rounds to

the nearest hundredth (3.456 becomes 3.46).  Scale can be negative,

which causes rounding to the left of the decimal point.  For example,

a scale of -3 rounds to the nearest thousand (3456 becomes 3000).  A

scale of zero rounds to the nearest whole number.  If you do not specify

the scale, it defaults to zero.

The NUMBER subtypes below have the same range of values as their base

type.  For example, FLOAT is just another name for NUMBER.

DEC

DECIMAL

DOUBLE PRECISION

FLOAT

INTEGER

INT

NUMERIC

REAL

SMALLINT

You can use these subtypes for compatibility or when you want an

identifier more descriptive than NUMBER.

时间: 2024-08-17 20:35:44

Oracle 中的Interger类型的相关文章

Oracle中的字符串类型及相关函数详解

1.概述 本文介绍String类型及相关的函数,基于当前最新的Oracle 12c 为基础作介绍. 下文将字符串简称为串. Oracle函数的工作方式有两种: 1.根据旧的对象创建新的对象--他们对原来的信息进行修改,如改变字母的大小写. 2.告诉用户有关的信息,如一个单词或句子中有几个字符. 后续会更新另外两种处理文本的方式:Oracle中的正则表达式 和 Oracle Text工具,等文章编辑完成,会在此处添加链接. Oracle中主要有两种字符串类型:CHAR和VARCHAR2,他们以字母

oracle中的number类型

number 数据类型 number (precision,scale) a)    precision表示数字中的有效位,如果没有指定precision的话,oracle将使用38作为精度: b)    如果scale大于零,表示数字精度到小数点右边的位数:scale默认设置为0:如果scale小于零,oracle将把该数字取舍到小数点左边的指定位数. c)    Precision 的取值范围是[1-38];scale的取值范围是[-84-127]. d)    Number整数部分允许的长

在JSP中获取oracle中的时间戳类型的字段并显示

在oracle中有一种特殊的时间显示类型——Timestamp时间戳 通常我们将当前时间转化为时间戳的语法如下: select cast (sysdate as timestamp ) from dual 在一个JSP页面中,需要获取一个时间戳字段,以显示在页面上 首先,是对JDBC的操作 sql语句用: select * from testlibrary 假设testlibrary中的modifydate字段的类型为TIMESTAMP(6) Testlibrary tlb= new Testl

Oracle中的TIMESTAMP类型[转]

原文:http://wangyaobeijing.blog.163.com/blog/static/158330320113276114762/ 1 SQL> create table test_time (col_time timestamp); 2 3 表已创建. 4 5 SQL> insert into test_time values (to_timestamp('0001-1-1 0:0:0.0', 'syyyy-mm-dd hh24:mi:ss.ff')); 6 7 已创建 1 行

oracle中关于clob类型字段的查询效率问题

今天,公司项目某个模块的导出报如下错误: HTTP Status 500 – Internal Server Error Type Exception Report Message Handler dispatch failed; nested exception is java.lang.OutOfMemoryError: GC overhead limit exceeded Description The server encountered an unexpected condition

ORACLE中对LONG类型进行处理的方法

原文来自 Techfox IT技术论坛 1.在block中处理:不过PL/SQL代码只能处理不超过32K的数据,超过这个限制,就无法通过PL/SQL来处理. SQL> SET SERVEROUT ON SQL> BEGIN 2 FOR I IN (SELECT * FROM T_LONG) LOOP 3 IF INSTR(I.LONG_COL, 'WORLD') > 0 THEN 4 DBMS_OUTPUT.PUT_LINE(I.ID); 5 END IF; 6 END LOOP; 7

如何在Oracle中向Collection类型的变量中逐条插入数据

这篇文章将要介绍如果需要生成一个新的Collection并且向其中添加数据的方法. procedure insert_object(d in dept_array, d2 out dept_array) isbegin --First way to insert data into a new array. SELECT CAST(MULTISET (SELECT DNO, name, location FROM department_teststruct) AS dept_array) INT

Oracle中的数值处理相关函数介绍

转载请注明出处:http://blog.csdn.net/anxpp/article/details/51551008,谢谢! 1.概述 Oracle函数处理三种类型的数值:单值.值组和值列表. 这些函数跟串函数一样,用来更改数值或者是返回数值相关的信息. 数值类型区分如下: 单值:只是一个数值,如常数值.PL/SqL等中的变量.数据库的一列和一行的一个数字等.Oracle的单值函数通常通过计算来更改这些值. 值组:一系列数据行中的某一列的所有数值数据.Oracle值组函数提供的是整个组的信息,

oracle中int类型和number类型区别

INT类型是NUMBER类型的子类型.下面简要说明:(1)NUMBER(P,S)该数据类型用于定义数字类型的数据,其中P表示数字的总位数(最大字节个数),而S则表示小数点后面的位数.假设定义SAL列为NUMBER(6,2)则整数最大位数为4位(6-2=4),而小数最大位数为2位.(2)INT类型当定义整数类型时,可以直接使用NUMBER的子类型INT,顾名思义:INT用于整型数据. oracle本来就没有int类型,为了与别的数据库兼容,新增了int类型作为number类型的子集.int类型只能