OCP-1Z0-051-2015-46题

QUESTION NO: 46
Which three statements are true regarding the data types in Oracle Database 10g/11g? (Choose
three.)
A. The BLOB data type column is used to store binary data in an operating system file
B. The minimum column width that can be specified for a VARCHAR2 data type column is one
C. A TIMESTAMP data type column stores only time values with fractional seconds
D. The value for a CHAR data type column is blank-padded to the maximum defined column width
E. Only One LONG column can be used per table
Answer: B,D,E
Explanation:

LONG Character data in the database character set, up to 2GB. All the functionality of LONG
(and more) is provided by CLOB; LONGs should not be used in a modern database, and if your
database has any columns of this type they should be converted to CLOB. There can only be one
LONG column in a table.
DVARCHAR2 Variable-length character data, from 1 byte to 4KB. The data is stored in the
database character set. The VARCHAR2 data type must be qualified with a number indicating the
maximum length of the column.
If a value is inserted into the column that is less than this, it is not a problem: the value will only
take up as much space as it needs. If the value is longer than this maximum, the INSERT will fail
with an error. VARCHAR2(size)
Variable-length character data (A maximum size must be specified: minimum size is 1; maximum
size is 4,000.)
BLOB Like CLOB, but binary data that will not undergo character set conversion by Oracle Net.
BFILE A locator pointing to a file stored on the operating system of the database server. The size of the files is limited to 4GB.
TIMESTAMP This is length zero if the column is empty, or up to 11 bytes, depending on the
precision specified.
Similar to DATE, but with precision of up to 9 decimal places for the seconds, 6 places by default.

准则
• 在使用子查询创建表时不复制LONG列。
• 不能在GROUP BY或ORDER BY子句中包括LONG列。
• 每个表只能使用一个LONG列。
• 不能对LONG列定义约束条件。
• 可以要求使用CLOB列,而不是LONG列。

A. BLOB数据类型列被用于存储二进制数据的操作系统文件。错误,不是操作系统文件。
B. 对于VARCHAR2数据类型最小的列宽可以为1(VARCHAR2为可变长度的数据类型).
C. 一个TIMESTAMP数据类型列只能存储带有小数秒的时间值。错误,也可以存储不带小数秒的日期或时间
D. CHAR数据类型列的值是用空格填充到列定义的最大值(也就是说,如果定义了CHAR(20),而字符串长度不够20个,则用空格填充不够的位数,CHAR为固定长度数据类型)
E. 每个表中只能使用一个LONG列。正确

SQL CLOB 是 内置类型 ,它将字符大对象 (Character Large Object) 存储为数据库表某一行中的一个列值。
CLOB使用CHAR来保存数据。如:保存XML文档 ; BLOB就是使用二进制保存数据。 如:保存位图。



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值