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 databases
  1. Equi Join

  2. Natural Join

  3. Left Inner Join

  4. Cartesian product

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

'Left Inner Join' is not a valid join type in SQL. Inner join returns rows matching in both tables; left outer join returns all rows from left table plus matches. Combining 'Left' and 'Inner' is contradictory. Valid joins include Equi Join, Natural Join, and Cartesian product (cross join).

Multiple choice technology databases
  1. 0

  2. 1

  3. 8

  4. Any number

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

In Oracle, a table can have only one LONG column. The LONG datatype is deprecated in favor of LOB datatypes (CLOB, BLOB), but the restriction of one LONG column per table still applies. This is a well-known Oracle limitation.

Multiple choice technology databases
  1. True

  2. False

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

When a base table is dropped from the database, views that reference that table become invalid and cease to function properly. The view object definition may still exist in the data dictionary, but the view is not usable. The statement 'Does the view exist' is asking about usability - a view dependent on a dropped table does not exist as a functional object. The claimed answer (B - False) is correct.

Multiple choice technology platforms and products
    1. Pre-Form 2. Pre-Block 3. Pre-Record 4. When-New-Form-Instance 5. Pre-Text-Item
    1. Pre-Form 2. Pre-Block 3. Pre-Record 4. Pre-Text-Item 5. When-New-Form-Instance
    1. Pre-Form 2. pre-Record 3. Pre-Text-Item 4. pre-block 5. When-New-Form-Instance
    1. When-New-Form-Instance 2. Pre-Block 3. Pre-Record 4. Pre-Text-Item 5. pre-form
Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

When a form opens, triggers fire in hierarchical order: form level (PRE-FORM), then block level (PRE-BLOCK), then record level (PRE-RECORD), then item level (PRE-TEXT-ITEM), and finally the form instance trigger (WHEN-NEW-FORM-INSTANCE). Option B correctly sequences these from form to item level.

Multiple choice technology platforms and products
  1. True

  2. False

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

The POST-QUERY trigger fires after a query is executed and records are fetched. This trigger is meant for calculations, derivations, or non-database modifications only. You cannot modify actual database values in POST-QUERY because it fires after the data is already fetched and is not a database transaction trigger.

Multiple choice technology platforms and products
  1. True

  2. False

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

The Defer Required Enforcement property at form level controls when required field validation is performed - it delays validation until commit time rather than at item level. However, it does NOT prevent the When-Validate-Item trigger from firing. The When-Validate-Item trigger still executes regardless of this form-level setting.