Computer Knowledge

Database and SQL

3,929 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. when two tables in a join query have only a single join condition

  2. when two tables in a join query have too many join conditions

  3. This is hard to determine.

  4. when two tables in a join query have no join condition

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

A Cartesian product (cross join) occurs when two tables are joined without any join condition or WHERE clause linking them. Every row from the first table is paired with every row from the second table.

Multiple choice technology databases
  1. It is NOT possible to switch unless no active transaction exists in UNDO1.

  2. It is possible to switch to UNDO2, but current active transactions will abort.

  3. It is possible to switch to UNDO2; current active transactions will be automatically migrated to UNDO2.

  4. It is possible to switch to UNDO2; only current active transactions will continue to execute inside UNDO1.

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

When switching undo tablespaces in Oracle, you can switch to a new undo tablespace while active transactions continue using the old one. Only new transactions will use the new undo tablespace. Active transactions will complete in UNDO1 until they finish or the undo tablespace is taken offline.

Multiple choice technology databases
  1. It is NOT possible to switch unless no active transaction exists in UNDO1.

  2. It is possible to switch to UNDO2, but current active transactions will abort.

  3. It is possible to switch to UNDO2; current active transactions will be automatically migrated to UNDO2.

  4. It is possible to switch to UNDO2; only current active transactions will continue to execute inside UNDO1.

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

When switching undo tablespaces, Oracle allows active transactions in the old undo tablespace (UNDO1) to complete normally. New transactions use UNDO2, but existing ones continue in UNDO1 until they commit or rollback. This is standard Oracle behavior - you don't need to wait for all transactions to complete before switching.

Multiple choice technology databases
  1. Char >> number

  2. Char >> date

  3. Number >> varchar2

  4. Date >> varchar2

Reveal answer Fill a bubble to check yourself
A,B,C,D Correct answer
Explanation

All options are valid implicit data type conversions in many database systems: Char can implicitly convert to number (when numeric string), Char to date (when in date format), Number to varchar2, and Date to varchar2. These conversions happen automatically without explicit CAST or CONVERT functions.

Multiple choice technology databases
  1. CONCAT

  2. MOD

  3. ROUND

  4. CONVERSION FUNCTION

Reveal answer Fill a bubble to check yourself
A,B,C,D Correct answer
Explanation

All listed options are single-row functions in SQL: CONCAT (string concatenation), MOD (modulo operation), ROUND (numeric rounding), and conversion functions (TO_CHAR, TO_DATE, etc.) all operate on individual row values rather than aggregating across multiple rows like aggregate functions.

Multiple choice technology enterprise content management
  1. Continual Query Language

  2. Counted Query Language

  3. Continous Query Language

  4. None of the Above

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

CQL stands for Continuous Query Language, which is used for querying real-time data streams. Since "Continuous Query Language" is misspelled as "Continous" in option 525784, "None of the Above" is correct.