Computer Knowledge

Database and SQL

4,213 Questions

Master structured query language commands, database joins, table constraints, and alias generation. This section covers relational database management concepts and query outputs essential for technical aptitude. These technical questions feature prominently in banking IT officer exams and computer knowledge sections.

SQL queries and aliasesDatabase table constraintsDatabase joins and transformationsStored procedures and functions

Database and SQL Questions

Multiple choice technology programming languages
  1. The FOR EACH RECORD IN ORDER BY statement retrieves and loops only on the first occurrence of a field in a record

  2. The FOR EACH RECORD IN ORDER BY statement loops only on the first occurrence of a field in a record

  3. The FOR EACH RECORD IN ORDER BY statement retrieves and loops on all the occurrence of a field in a record

  4. The FOR EACH RECORD IN ORDER BY statement retrieves and loops on only the last occurrence of a field in a record

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The FOR EACH RECORD IN ORDER BY statement both retrieves and loops through only the FIRST occurrence of a field in each record, not all occurrences. This is important when you want to process unique records without duplicate field values. Option A correctly describes this behavior. Options B, C, and D are incorrect because the statement doesn't just loop without retrieval, doesn't process all occurrences, and isn't limited to the last occurrence.

Multiple choice technology programming languages
  1. The count obtained by the COUNT OCCURRENCES statement.

  2. The Count obtained from counting the number of 'IN' in your M204 Code.

  3. Counting of the M204 Database files used in the Code

  4. Count obtained by the Count Statement.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The COUNT IN clause refers specifically to the count value generated by the COUNT OCCURRENCES statement, not to counting 'IN' keywords or database files. This allows you to use the occurrence count in subsequent operations. Option A correctly identifies this relationship. Options B and D are incorrect because COUNT IN doesn't count keywords or use a generic Count statement. Option C is incorrect because it doesn't count database files.

Multiple choice technology programming languages
  1. ADD statement

  2. CHANGE statement

  3. STORE RECORD statement

  4. All the Above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The VALUE IN statement can be used with ADD, CHANGE, and STORE RECORD statements in Model 204, making it versatile for field manipulation. It allows you to reference specific values within these operations. Option D correctly states that VALUE IN works with all three statement types. Options A, B, and C are incorrect because VALUE IN isn't limited to just one of these statements - it works with all of them.

Multiple choice technology programming languages
  1. CHANGE FULLNAME TO NULL

  2. CHANGE FULLNAME TO ‘NULL’

  3. CHANGE FULLNAME TO 0

  4. DELETE FULLNAME

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The statement 'CHANGE FULLNAME TO' with no value specified is equivalent to 'DELETE FULLNAME' - it removes the field from the record. This is a shorthand way to delete a field without explicitly using the DELETE command. Option D correctly identifies this equivalence. Options A, B, and C are incorrect because they attempt to assign specific values (NULL as keyword, string, or number) when the actual operation is deletion.

Multiple choice technology programming languages
  1. PLACE RECORDS IN label IN [LIST] listname

  2. PLACE RECORDS IN label ON [LIST] listname

  3. PLACE RECORDS ON label ON [LIST] listname

  4. PLACE RECORDS ON label IN [LIST] listname

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The correct syntax in Model 204 User Language for placing records onto a list is PLACE RECORDS IN label ON [LIST] listname.

Multiple choice technology programming languages
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The ADD statement in Model 204 can only be used to add new field values to a record within the FOR EACH RECORD loop. This restriction ensures that additions are properly context-aware and associated with the correct record. Option A (True) correctly states this limitation. Option B (False) is incorrect because the ADD statement cannot be used outside the loop context.

Multiple choice technology programming languages
  1. LIST$
  2. LIST listname

  3. Listname

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

LIST$ is the correct syntax to reference a list collection in a FIND condition. The $ symbol is the standard identifier for list variables in this system, while other options either use incorrect keywords or incomplete syntax.