Tag: databases

Questions Related to databases

Dropping a table has which of the following effects on a nonunique index created for the table?

  1. No effect

  2. The index will be rendered invalid

  3. The index will be dropped

  4. The index will contain NULL values.


Correct Option: C

AI Explanation

To answer this question, we need to understand what happens to a nonunique index when a table is dropped.

Option A) No effect - This option is incorrect because dropping a table does have an effect on the index.

Option B) The index will be rendered invalid - This option is incorrect. When a table is dropped, the index is not rendered invalid. It is either dropped or remains intact.

Option C) The index will be dropped - This option is correct. When a table is dropped, all associated indexes are also dropped. This includes nonunique indexes created for the table.

Option D) The index will contain NULL values - This option is incorrect. Dropping a table does not affect the existing values in the index. Instead, the index itself is either dropped or remains intact.

The correct answer is C) The index will be dropped. This option is correct because when a table is dropped, all associated indexes, including nonunique indexes, are also dropped.

  1. Names starting with “a”

  2. Names with "a" as second character

  3. Last character as "a"

  4. Names with atleast two "a" at the start.


Correct Option: B
  1. DELETE clause

  2. INSERT clause

  3. SELECT clause

  4. JOIN clause


Correct Option: C
  1. Strong Query Language

  2. Standard Query Language

  3. Strict Query Language

  4. Structured Query Language


Correct Option: D
  1. The name of the table we are selecting from

  2. list of columns to be selected

  3. Definition of the condition to be met for the rows to be returned

  4. None of above


Correct Option: C

What is a primary key?

  1. The primary key column is a column or combination of columns whose values can be non-unique

  2. The primary key is a column or combination of columns whose values uniquely identify each row in the table

  3. The primary key is a column that can have NULL values

  4. all of above


Correct Option: B
  1. An index is the same as alias

  2. An index is a database table attribute, which speeds-up data search within a table

  3. An index is a special way to join 2 or more tables

  4. None of above


Correct Option: B