[ 答朋友問] same namespace ?

yxyup發表於2009-05-21
kerryyu 說 (10:01):
能否請教你一道ORACLE題目
Young more think、more practise、more sum-up 說 (10:01):
 好
kerryyu 說 (10:01):
10. Which of the following objects share the same namespace and therefore cannot have the same name?
A. Tables and sequences
B. Tables and indexes
C. Tables and tablespaces
D. Tables and constraints

答案是A,
見以下驗證過程


SQL> create table t1(id number);

Table created.

SQL>
SQL> create index t1 on t1(id);

Index created.

SQL>
SQL> alter table t1 add constraint t1 primary key(id);

Table altered.

SQL> create sequence t1 increment by 1 start with 1 ;
create sequence t1 increment by 1 start with 1
                *
ERROR at line 1:
ORA-00955: name is already used by an existing object

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7364032/viewspace-600645/,如需轉載,請註明出處,否則將追究法律責任。

相關文章