Tag: databases

Questions Related to databases

  1. Not NULL

  2. Primary key

  3. Foreign key

  4. Composite primary keys


Correct Option: D

Which character function can be used to return a specified portion of a character string

  1. INSTR

  2. SUBSTRING

  3. SUBSTR

  4. POS


Correct Option: C

AI Explanation

To answer this question, you need to understand the character functions used in string manipulation.

Option A) INSTR - This option is incorrect because the INSTR function is used to find the starting position of a specified substring within a string.

Option B) SUBSTRING - This option is incorrect because the SUBSTRING function is used to extract a substring from a string based on a specified starting position and length.

Option C) SUBSTR - This option is correct because the SUBSTR function is used to extract a substring from a string based on a specified starting position and, optionally, a length.

Option D) POS - This option is incorrect because there is no standard character function called POS in most programming languages or database systems.

The correct answer is C) SUBSTR. This option is correct because the SUBSTR function is specifically designed to return a specified portion of a character string.

  1. Primary key access

  2. Access via unique index

  3. Table access by ROWID

  4. Full table scan


Correct Option: C
  1. System tablespace

  2. Users tablespace

  3. Default tablespace for the user

  4. Undefined


Correct Option: C

To use Global temporary tables in a compound statement you require which type of tablespace to be present

  1. User temporary

  2. Large

  3. System

  4. Regular


Correct Option: A
  1. Simplifies code reuse, code standardization and code maintenance

  2. Controlled access to other database objects

  3. Improving application performance

  4. DB2 Stored Procedures can be written only in SQL.


Correct Option: D