47. What happens if the constraint name is left out of a constraint clause

 

The Oracle system will use the default name of SYS_Cxxxx where xxxx is a system generated number. This is bad since it makes tracking which table the constraint belongs to or what the constraint does harder.

 

 

48. What happens if a tablespace clause is left off of a primary key constraint clause

 

This results in the index that is automatically generated being placed in then users default tablespace. Since this will usually be the same tablespace as the table is being created in, this can cause serious performance problems.

 

 

49. What is the proper method for disabling and re-enabling a primary key constraint

 

You use the ALTER TABLE command for both. However, for the enable clause you must specify the USING INDEX and TABLESPACE clause for primary keys.

 

 

50. What happens if a primary key constraint is disabled and then enabled without fully specifying the index clause

 

The index is created in the user?s default tablespace and all sizing information is lost. Oracle doesn?t store this information as a part of the constraint definition, but only as part of the index definition, when the constraint was disabled the index was dropped and the information is gone.

Advertisements