admin 管理员组文章数量: 1087139
2024年4月15日发(作者:vab常用代码)
Oracle之PLSQL的变量小结
Variable summary of PL/SQL's Oracle
There are four types of PLSQL variables, namely:
Scalar type (Scalar)
-composite type (Composite)
-reference type (Reference)
LOB type (Large Object)
1 scalar type:
-a variable that holds only a single value
-when defining, you must specify scalar data types
1.1 commonly used scalar types
(1)VARCHAR2 (n);
Defines strings of variable length
N specifies the maximum length of the string
The maximum value of n is 32767 bytes
The length must be specified when using
When the PLSQL block uses this data type to manipulate the VARCHAR2 table
column, the value should be no more than 4000 bytes long
(2)CHAR (n):
Defines a fixed length string
N specifies the maximum length of a string
The maximum value of n is 32767 per se
Specifies the length when used. If not specified, the default value is 1
When the PLSQL block uses this data type to manipulate the CHAR2 table column, the
value should be no more than 2000 bytes long
(3)NUMBER (P, s);
Defines integer and floating-point numbers of fixed length
P represents precision, used to specify the total number of digits
S represents the scale used to specify the number of digits after the decimal point
(4)DATE
Define date and data data
(5)BOOLEAN
Define Boolean variables
版权声明:本文标题:Oracle之PLSQL的变量小结 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/b/1713176859a622624.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论