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.
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
could anyone explain why option c is wrong…?
because you can explicitly define null
In a column with a DEFAULT you can explicitly insert NULL values.
Viji
Since u asked why C is wrong…… u can refer the following link for ur clarification
https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:2575782100346318728
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.”
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).
No it’s not in the Scott schema check your link it is in the ROBERT schema
Justyna, I think we can have just as PRIVATE !
ORA-01471: impossible de créer un synonyme avec le même nom
http://mehrajdba.wordpress.com/2009/07/22/namespaces/
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.
Sorry, try to create a Public Synonym.
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.
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.
Option D is wrong
follow the link to confirm
http://www.dbasupport.com/forums/showthread.php?59423-Can-a-table-and-a-materialized-view-have-the-same-name-in-one-schema-in-a-DB
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