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. Drop

  2. Create

  3. Alter

  4. Rename

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

Teradata MLOAD supports the DROP DDL statement, allowing users to drop tables as part of the MLOAD script. However, MLOAD does not support CREATE, ALTER, or RENAME DDL statements - these must be executed separately outside of MLOAD. MLOAD is optimized for high-volume data loading with limited DDL support, focusing on DELETE and INSERT operations along with DROP for target table management.

Multiple choice technology databases
  1. Return records which have no direct match

  2. Return records which have direct match

  3. Return all the records

  4. None of the above

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

An outer join returns records from one table even when there's no matching record in the other table. This is useful for finding unmatched records (like customers without orders) or maintaining all records from a primary table.

Multiple choice technology databases
  1. (+)

  2. (-)

  3. (*)

  4. +

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

The (+) symbol is the Oracle-specific outer join operator, traditionally used before ANSI standard JOIN syntax was adopted. It's placed on the side of the join condition that may be missing (NULL).

Multiple choice technology databases
  1. Selfjoin

  2. Outerjoin

  3. innerjoin

  4. equijoin

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

A self-join joins a table to itself, treating it as if it were two separate tables. This is useful for comparing rows within the same table, such as finding employee-manager relationships in an employees table.

Multiple choice technology databases
  1. Single-row Functions and Double-row Functions

  2. One-row Functions and Two-row Functions

  3. Single-row Functions and Multiple-row Functions

  4. None of the above

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

SQL functions are categorized into single-row functions (operate on one row at a time, like UPPER, SUBSTR) and multiple-row functions (operate on groups of rows, like SUM, COUNT, AVG). This classification determines how they're used in queries.

Multiple choice technology databases
  1. Table1.column1=Table2.column2

  2. Table1.column1=Table2.column1

  3. Table1.column2=Table2.column1

  4. None of the above

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

An equi-join is a join based on equality between columns, typically joining on the same column name from different tables. Option B shows Table1.column1 = Table2.column1, which represents an equi-join condition where the same column from both tables is being compared for equality.