Tag: databases

Questions Related to databases

There are 10 tables with similar structure but mutually exclusive records. A query needs to fetch some records from each of these tables. Which of the following is the best approach to do this?

  1. Use UNION between the 10 SELECT statements

  2. Execute separate SQL statements and let the front-end merge the results

  3. Use UNION ALL between the 10 SELECT statements

  4. Define a temporary table and populate it with data from the 10 SELECT statements and then do a single SELECT from this table


Correct Option: C
  1. It will describe the table.

  2. It will return ar error:'Table or view does not exist'

  3. The query is not correct.

  4. None of the above


Correct Option: A

We can use group by clause with:

  1. Non aggregate functions only

  2. Aggregate functions only

  3. Both 1 & 2

  4. None of the above


Correct Option: B
  1. update table TABLE_NAME set COMLUMN_NAME= where

  2. update TABLE_NAME set COMLUMN_NAME= where

  3. Both 1 & 2 are correct

  4. None of the above


Correct Option: B

Bitmap index is suitable for the tables having huge and repeatative(duplicates) data.

  1. True

  2. False


Correct Option: A

SPLIT function is available in SQL server 2005?

  1. True

  2. False


Correct Option: B

DDL means?

  1. Data Dynamic Link

  2. Data Description Language

  3. Data Definition Language

  4. Data Definition Link


Correct Option: C