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

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在一个数据库里面可以有相同的表名

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值