Friday, September 7, 2012

Database Concepts Quiz


Database concepts Quiz1


In which of the following ways does “TRUNCATE TABLE” differ from “DELETE”? 

A. Truncate operations drop and re-create the table which is much faster than deleting rows. one by one.

B. All the options


C. The number of deleted rows are not returned.

D. Truncate operations are not transaction safe.



B
NULL value is equivalent to a value of Zero if the data type is number



False
What is joining a Table to itself called?

A. Inner join


B. Outer join

C. Left inner join

D. Self Join

D
Which of the following options list the steps to convert a table to its second normal form?


A. Find and remove fields that are related to the only part of the key.


B. Group the removed items in the another table.

C. All the options


D. Assign the new table with the key i.e. part of the whole composite key.


C
A foreign key must have a corresponding primary key or unique key value in the master table.
Incorrect


True
Integrity constraint can be dropped if the rule that it enforces is not longer TRUE or if the constraint is no longer needed.


True
What would be the output of following command.

SELECT TRANSLATE('1sct523','123', '7a9') “Change” FROM DUAL; 

A. Change
7 sct 5a9
B. 7 sct


C. 7sct 5a9


D. None of the options


A
Sometimes tables within particular database become obsolete and ought to be discarded. Which of the following commands would you use for the same?
A. REMOVE TABLE < TABLE NAME> 


B. DELETE TABLE < TABLE NAME >

C. DROP TABLE < TABLE NAME >


D. None of the options


C
Following tasks can be performed when using the ALTER TABLE clause:

1.Change the name of the table
2.Change the name of the column
3.Decrease the size of a column if table data exists.


False
False ( all above tasks can not be performed )
SELECT TRIM(' Hansel ' ) “Trim both sides” FROM DUAL

What would be the output of the above command?

A. Trim both sides
Hansel 

B. None of the options

C. Hansel 


D. Trim both sides 


A

No comments:

Post a Comment