1Z0-051 QUESTION 27 table的命名规则

来源:互联网 发布:mac r语言安装 编辑:程序博客网 时间:2024/05/01 03:31
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 objectSQL> create public synonym test1 for test1;Synonym created.

F选项对,不同的schema在一个数据库里面可以有相同的表名

0 0
原创粉丝点击