Sql Interview Question and Answers

101. What is the use of DESC in SQL?
  DESC has two purposes.
It is used to describe a schema as well as to retrieve rows from table in descending order.
 
Your Name Your Email-ID
Your Answer
102. What is a cluster Key?
  The related columns of the tables are called the cluster key. The cluster key is indexed using a cluster index and its value is stored only once for multiple tables in the cluster.
 
Your Name Your Email-ID
Your Answer
103. Define candidate key, alternate key, composite key?
  A candidate key is one that can identify each row of a table uniquely. Generally a candidate key becomes the primary key of the table.

If the table has more than one candidate key, one of them will become the primary key, and the rest are called alternate keys.

A key formed by combining at least two or more columns is called composite key.
 
Your Name Your Email-ID
Your Answer
104. What is Self Join?
  A self join can be of any type, as long as the joined tables are the same. A self join is rather unique in that it involves a relationship with only one table.
 
Your Name Your Email-ID
Your Answer
105. What is Storage Manager?
  It is a program module that provides the interface between the low-level data stored in database, application programs and queries submitted to the system.
 
Your Name Your Email-ID
Your Answer