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. The sort is in ascending by order by default

  2. The sort is in descending order by default

  3. The ORDER BY clause must precede the WHERE clause

  4. The ORDER BY clause is executed on the client side

  5. The ORDER BY clause comes last in the SELECT statement

  6. The ORDER BY clause is executed first in the query execution

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

ORDER BY sorts in ascending order by default (A is true). The ORDER BY clause must come last in a SELECT statement, after WHERE, GROUP BY, HAVING (E is true). It does not sort descending by default (B is false). It must come after WHERE, not before (C is false). It executes on the server, not client (D is false). It executes last in query processing, after the result set is formed (F is false).

Multiple choice technology databases
  1. update more than one row at a time.

  2. delete more than one row at a time.

  3. update only one row at a time.

  4. delete only one row at a time.

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

The UPDATE statement in SQL can modify multiple rows in a single execution. When the WHERE clause matches multiple rows, all those rows are updated simultaneously. UPDATE does not delete rows - that's what DELETE does. It can update one or many rows depending on the WHERE condition.

Multiple choice technology databases
  1. COMMIT

  2. MERGE

  3. UPDATE

  4. DELETE

  5. CREATE

  6. DROP

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

DML (Data Manipulation Language) statements manipulate data: MERGE combines insert/update/delete (B is true), UPDATE modifies existing data (C is true), DELETE removes rows (D is true). COMMIT is a transaction control statement (TCL), not DML (A is false). CREATE and DROP are DDL statements (Data Definition Language), not DML (E and F are false).

Multiple choice technology programming languages
  1. True

  2. False

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

Properties can indeed trigger events beyond simple read/write operations. For instance, in C# implementing INotifyPropertyChanged, a property setter can raise the PropertyChanged event to notify UI elements or other components of data changes, enabling reactive programming patterns.

Multiple choice technology packaged enterprise solutions
  1. Define EFFDT

  2. Define EFF_STATUS

  3. Define EFFDT, EFF_STATUS

  4. Define EFFDT as key, in descending order

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

An effective dated table tracks data changes over time, requiring EFFDT (effective date) as the key field sorted in descending order. This ensures queries easily access the most current record first. Options A, B, and C are incomplete - defining EFF_STATUS or simply having the fields isn't sufficient. The key requirement is proper key definition and ordering.

Multiple choice technology packaged enterprise solutions
  1. Prompt Table with Edit

  2. Translate Table Edit

  3. Yes/No Edit

  4. Prompt Table with No Edit

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

Prompt Table with No Edit allows users to add new values to the underlying prompt table directly. With Prompt Table with Edit enabled, users can only select from existing values and cannot add new ones. Translate Table Edit and Yes/No Edit have different purposes.

Multiple choice technology packaged enterprise solutions
  1. Setting %Date as constant

  2. Required

  3. Specifying Default using Record and Field values

  4. Reasonable date

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

The Reasonable Date property validates that dates are within an acceptable range (like not more than 30 days from current date). It prevents users from entering unrealistic dates. Required, Default, and Constant settings don't perform this date range validation.

Multiple choice technology packaged enterprise solutions
  1. Validates a field for Data to be entered on save of search dialog.

  2. Allows to edit the search key.

  3. Searches Edit fields for some values.

  4. Option available only for Alternate Search Keys

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

Selecting the 'Search Edit' property on a PeopleSoft record field forces the system to validate the data entered in that field when the search dialog is saved or executed.

Multiple choice technology databases
  1. Commit

  2. Cursors

  3. savepoint

  4. truncate

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

Cursors are not part of core SQL - they are part of procedural SQL extensions like PL/SQL (Oracle) or T-SQL (Microsoft). COMMIT, SAVEPOINT, and TRUNCATE are all standard SQL commands for transaction control and data definition respectively.

Multiple choice technology databases
  1. Order by

  2. Having

  3. Group by

  4. Where

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

In standard SQL, a subquery cannot have an ORDER BY clause when used in contexts where a set operation is expected (like WHERE, HAVING, or as a derived table). The ORDER BY would only apply to the outer query. However, this is context-dependent - some modern SQL implementations allow ORDER BY in subqueries with LIMIT/OFFSET.