您的位置:首页 > 产品设计 > UI/UE

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在一个数据库里面可以有相同的表名
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: