Which two statements are true regarding tables?

Which two statements are true regarding tables? (Choose two.)

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.



Leave a Reply 15

Your email address will not be published. Required fields are marked *


Rahul Damodaran

Rahul Damodaran

Option E is wrong.
A table and a synonym share the same namespace. Two objects in a same namespace cannot have a same name.
Refer to ‘OCA/OCP All in One exam guide’ From OsBourne, Chapter 7, Object Namespaces

viji

viji

could anyone explain why option c is wrong…?

Nikhil

Nikhil

because you can explicitly define null

Eamon

Eamon

In a column with a DEFAULT you can explicitly insert NULL values.

Justyna

Justyna

About option E

http://www.dba-oracle.com/concepts/synonyms.htm

“In fact, you can have a public and private synonym called EMP in the SCOTT schema and have a table called EMP in the same schema.”

Eamon

Eamon

Correction
Private synonyms are schema objects whereas public synonyms are not
therefore a public synonym and a private synonym can exist with the same name for the same table but not in the same schema (already mentioned Public synonyms are not schema objects).

Essam ghorab

Essam ghorab

No it’s not in the Scott schema check your link it is in the ROBERT schema

Justyna

Justyna

I tested in my database.
I could not create private synonym. It looks like something is wrong on that website I mentioned.
However I created public synonym with the same name like a table EMP in SCOTT schema.

Eric Sacramento

Eric Sacramento

Sorry, try to create a Public Synonym.

sh3342

sh3342

A. table name may be from 1 to 30 characters long
B. the maximum column number is 1000 in oracle
C. Test:

scott@ORCL>createtable zbcxy(name varchar(20) default ‘zbcxy’);

table created.

scott@ORCL>insertinto zbcxy values(‘ ‘);

1 row inserted.

scott@ORCL>select *from zbcxy;

NAME

D. test:
CREATE VIEW EMPLOYEES AS SELECT * FROM EMPLOYEES;
ERROR ORA-00955: NAME IS ALREADY USED BY AN EXISTING OBJECT.

Lorena Vásquez

Lorena Vásquez

my test

A table and a synonym share the same namespace. Two objects in a same namespace cannot have a same name.

create synonym scott.emp for scott.emp;

Error SQL: ORA-01471: cannot create a synonym with same name as object
01471. 00000 – “cannot create a synonym with same name as object”
*Cause:
*Action:

I can define synonyms of same type data, if they are synonyn publics.

Malvika

Malvika

tables,private synonyms,views,user-defined types share the same names space ,
[users,role,public synonym ] share same namespace,
Index has a different namespace,
last, constraints have a different names space all in the same schema