1Z0-051 QUESTION 27 table的命名规则
2014-05-11 15:03
399 查看
QUESTION 27
Which two statements are true regarding tables? (Choose two.)
A. A table name can be of any length.
B. A table can have any number of columns.
C. A column that has a DEFAULT value cannot store null values.
D. A table and a view can have the same name in the same schema.
E. A table and a synonym can have the same name in the same schema.
F. The same table name can be used in different schemas in the same database.
答案:EF
解析:
命名规则参看官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/sql_elements008.htm#SQLRF51129
A选项错,表名只能是1-30个字符:
Names must be from 1 to 30 bytes long with these exceptions:
Names of databases are limited to 8 bytes.
Names of database links can be as long as 128 bytes.
B选项错,最多只能1000个列
C选项错,DEFAULT可以指定null为默认值。
SQL> create table test1 (
2 t1 varchar2(10) default null);
D选项错,一个schema里面不能有相同的table name。
E选项部分对,synonym 可以相同,但仅仅是public synonym。
SQL> create synonym test1 for test1;
create synonym test1 for test1
*
ERROR at line 1:
ORA-01471: cannot create a synonym with same name as object
SQL> create public synonym test1 for test1;
Synonym created.
F选项对,不同的schema在一个数据库里面可以有相同的表名
Which two statements are true regarding tables? (Choose two.)
A. A table name can be of any length.
B. A table can have any number of columns.
C. A column that has a DEFAULT value cannot store null values.
D. A table and a view can have the same name in the same schema.
E. A table and a synonym can have the same name in the same schema.
F. The same table name can be used in different schemas in the same database.
答案:EF
解析:
命名规则参看官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/sql_elements008.htm#SQLRF51129
A选项错,表名只能是1-30个字符:
Names must be from 1 to 30 bytes long with these exceptions:
Names of databases are limited to 8 bytes.
Names of database links can be as long as 128 bytes.
B选项错,最多只能1000个列
C选项错,DEFAULT可以指定null为默认值。
SQL> create table test1 (
2 t1 varchar2(10) default null);
D选项错,一个schema里面不能有相同的table name。
E选项部分对,synonym 可以相同,但仅仅是public synonym。
SQL> create synonym test1 for test1;
create synonym test1 for test1
*
ERROR at line 1:
ORA-01471: cannot create a synonym with same name as object
SQL> create public synonym test1 for test1;
Synonym created.
F选项对,不同的schema在一个数据库里面可以有相同的表名
相关文章推荐
- 1Z0-051 QUESTION 26 table的命名规则
- OCP-1Z0-051 第27题 oracle对象命名规则
- OCP-1Z0-051 第26题 oracle对象命名规则
- OCP 1Z0 051 QUESTION NO: 27
- 1Z0-051 QUESTION 1 利用CREATE TABLE AS创建表
- 1Z0-051 QUESTION 11 运算顺序
- OCP 1Z0 051 QUESTION NO: 21
- OCP 1Z0 051 QUESTION NO: 35
- OCP 1Z0 051 QUESTION NO: 53
- 1Z0-051 QUESTION 29 关于约束
- 1Z0-051 30. Evaluate thefollowing CREATE TABLE commands
- OCP 1Z0 051 QUESTION NO: 1
- OCP 1Z0 051 QUESTION NO: 12
- OCP 1Z0 051 QUESTION NO: 22
- OCP 1Z0 051 QUESTION NO: 36
- OCP-1Z0-051 第28题 oracle约束规则
- 1Z0-051 QUESTION 2 选项WITH CHECK OPTION在CREATE VIEW中的使用
- 1Z0-051 QUESTION 6 CASE和DECODE用法
- 1Z0-051 QUESTION 12 别名和INITCAP的运用
- OCP 1Z0 051 QUESTION NO: 2