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. A matrix object merely defines a relationship between two repeating frames

  2. A cursor is static

  3. A non-linkable query is a detail query that contains column objects that prevent the query from being linked to via a column-to-column link

  4. None of the above

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

The statement 'A cursor is static' is false - cursors can be dynamic depending on the database and configuration. Matrix objects do define relationships between repeating frames, and non-linkable queries contain columns preventing column-to-column linking. Therefore B is NOT true.

Multiple choice technology
  1. Function Name, <package_name>.<procedure_name>

  2. Display Name, <package_name>.<procedure_name>

  3. Display Name, <function_name>

  4. Function Name, <package_name>.<function_name>

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

In the Function window, you specify the PL/SQL function using the format . in the Function Name field. This fully qualified name identifies the stored procedure within its package. The Display Name is just for human-readable labels, not the actual function specification.

Multiple choice technology
  1. True

  2. False

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

The Oracle Workflow Engine passes four standard parameters (item type, item key, activity ID, and command mode) to stored procedures called for function activities. The procedure can return a result status that the engine uses to determine workflow progression. This parameter passing is part of the standard PL/SQL API for workflow functions.

Multiple choice technology
  1. Call Section and SQL

  2. Do Select and SQL

  3. Call Section and PeopleCode

  4. PeopleCode and Do Select

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

In PeopleSoft Application Engine, Call Section and SQL actions cannot coexist in the same step because they represent different execution paradigms - Call Section transfers control to another section, while SQL executes database statements directly. Do Select and PeopleCode can both be used in the same step with Call Section or SQL.

Multiple choice technology databases
  1. GROUP BY, HAVING, WHERE

  2. HAVING, WHERE, GROUP BY

  3. GROUP BY, WHERE, HAVING

  4. WHERE, GROUP BY, HAVING

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

The WHERE clause filters individual rows before grouping, then GROUP BY aggregates those rows into groups, and finally HAVING filters the aggregated groups based on group-level conditions. This order ensures efficient query execution.

Multiple choice technology databases
  1. Both the INSERTs and the UPDATE fails.

  2. The INSERTs work, but the UPDATE fails

  3. Only the first INSERT works.

  4. Only the second INSERT works

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

The first INSERT succeeds because no rows exist. The second INSERT fails because it violates the Unique Primary Index on column A - row (1,2) already exists with A=1. The UPDATE would affect 0 rows since the second INSERT failed.

Multiple choice technology databases
  1. Return Top 3 Row in the Retailer Table

  2. Return Error

  3. Return No Record

  4. Return all Records from Retailer Table

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

The subquery 'select top 3 Rtrid from retailer' returns multiple rows, but the WHERE clause uses '=' which expects a single value. Comparing a column to multiple rows with '=' causes an error - you should use 'IN' instead for multiple values.