1Z0-51 QUESTION 20 表的数据类型应该注意的地方
2014-05-10 23:26
351 查看
QUESTION 20
Which three statements are true regarding the data types in Oracle Database 10g/11g? (Choose three.)
A. Only one LONG column can be used per table.
B. A TIMESTAMP data type column stores only time values with fractional seconds.
C. The BLOB data type column is used to store binary data in an operating system file.
D. The minimum column width that can be specified for a VARCHAR2 data type column is one.
E. The value for a CHAR data type column is blank-padded to the maximum defined column width.
答案:ADE
解析:
A选项,一个表中不能创建两个long:
B选项,TIMESTAMP类型不但能存储带小数秒的数值,还能存储其他数值官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e40540/tablecls.htm#CNCPT1841
The
The
The
to the time zone of the user session. This data type is useful for collecting and evaluating date information across geographic regions.
C选项,BLOB数据类型存储非结构化的二进制大对象,不是系统文件,存储系统文件的可以用BFILE类型:
The
can store binary data up to (4 gigabytes -1) * (the value of the
of LOB storage when creating a LOB column, then this is equivalent to (4 gigabytes - 1) * (database block size).
manipulations can be committed and rolled back. However, you cannot save a
The
type enables access to binary file LOBs that are stored in file systems outside Oracle Database.
D选项,解析如下:
SQL> create table t3 (t1 varchar2(1));
Table created.
E选项,虽然char(10)可能只存了一个A,但长度却是10:
SQL> create table t4 (t1 char(10));
Table created.
SQL> insert into t4 values('A');
1 row created.
SQL> select t1,length(t1) from t4;
T1 LENGTH(T1)
-------------------- ----------
A 10
Which three statements are true regarding the data types in Oracle Database 10g/11g? (Choose three.)
A. Only one LONG column can be used per table.
B. A TIMESTAMP data type column stores only time values with fractional seconds.
C. The BLOB data type column is used to store binary data in an operating system file.
D. The minimum column width that can be specified for a VARCHAR2 data type column is one.
E. The value for a CHAR data type column is blank-padded to the maximum defined column width.
答案:ADE
解析:
A选项,一个表中不能创建两个long:
SQL> create table t1( 2 id long 3 , 4 d1 long); d1 long) * ERROR at line 4: ORA-01754: a table may contain only one column of type LONG
B选项,TIMESTAMP类型不但能存储带小数秒的数值,还能存储其他数值官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e40540/tablecls.htm#CNCPT1841
The
TIMESTAMPdata type is an extension of the
DATEdata type. It stores fractional seconds in addition to the information stored in the
DATEdata type.
The
TIMESTAMPdata type is useful for storing precise time values, such as in applications that must track event order.
The
DATETIMEdata types
TIMESTAMP WITH TIME ZONEand
TIMESTAMP WITH LOCAL TIME ZONEare time-zone aware. When a user selects the data, the value is adjusted
to the time zone of the user session. This data type is useful for collecting and evaluating date information across geographic regions.
C选项,BLOB数据类型存储非结构化的二进制大对象,不是系统文件,存储系统文件的可以用BFILE类型:
The
BLOBdata type stores unstructured binary large objects.
BLOBobjects can be thought of as bitstreams with no character set semantics.
BLOBobjects
can store binary data up to (4 gigabytes -1) * (the value of the
CHUNKparameter of LOB storage). If the tablespaces in your database are of standard block size, and if you have used the default value of the
CHUNKparameter
of LOB storage when creating a LOB column, then this is equivalent to (4 gigabytes - 1) * (database block size).
BLOBobjects have full transactional support. Changes made through SQL, the
DBMS_LOBpackage, or Oracle Call Interface (OCI) participate fully in the transaction.
BLOBvalue
manipulations can be committed and rolled back. However, you cannot save a
BLOBlocator in a PL/SQL or OCI variable in one transaction and then use it in another transaction or session.
The
BFILEdata
type enables access to binary file LOBs that are stored in file systems outside Oracle Database.
D选项,解析如下:
SQL> create table t3 (t1 varchar2(1));
Table created.
E选项,虽然char(10)可能只存了一个A,但长度却是10:
SQL> create table t4 (t1 char(10));
Table created.
SQL> insert into t4 values('A');
1 row created.
SQL> select t1,length(t1) from t4;
T1 LENGTH(T1)
-------------------- ----------
A 10
相关文章推荐
- 1Z0-051 QUESTION 24 数据类型应该注意的地方
- 1Z0-051 QUESTION 21 LONG数据类型应该注意的地方
- 1Z0-051 QUESTION 23 数据类型应该注意的地方
- 1Z0-051 QUESTION 25 表名应该注意的地方和CLOB应该注意的地方
- acm应该注意的数据类型问题
- Java 数据类型中需要注意的几个小地方
- 1Z0-051 QUESTION 36 create table中约束应注意的地方
- 使用数据类型注意的地方
- javascript应该注意的小case--数据类型
- 关于数据类型Char要注意的地方
- 本文从如何建立mysql索引以及介绍mysql的索引类型,再讲mysql索引的利与弊,以及建立索引时需要注意的地方 首先:先假设有一张表,表的数据有10W条数据,其中有一条数据是nickname='
- JAVA中数据类型划分应该注意的事项
- springmvc接收复杂类型的json数据需要注意的地方
- 关于数据类型float&decimal要注意的地方
- js 基本的数据类型(boolean需要注意的地方)
- java里String需要注意的地方以及基本数据类型注意点(不定期修改更新)
- acm应该注意的数据类型问题
- 浅谈javascript六种数据类型以及特殊注意点
- 面试应该注意哪些地方
- Oracle char 类型注意事项--导致sql查询查不到数据