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
-
Explicit cursor
-
Implicit cursor
-
% NOT FOUND
-
None of these
B
Correct answer
Explanation
Implicit cursors are used by Oracle for each UPDATE, DELETE and INSERT SQL commands.
-
DML
-
DDL
-
DCL
-
None of above
A
Correct answer
Explanation
PL/SQL is an extension of SQL that allows for procedural logic. It supports DML (Data Manipulation Language) commands like SELECT, INSERT, UPDATE, and DELETE.
-
DREF
-
REF
-
OREF
-
None of above
B
Correct answer
Explanation
In Oracle SQL, REF is a built-in operator that returns a reference to an object in an object table.
C
Correct answer
Explanation
PL/SQL is a procedural extension of SQL. It supports all SQL statements, including DML and DCL, by embedding them directly into its procedural blocks.
-
declarative
-
executable
-
exception handling
-
none of above
A
Correct answer
Explanation
A PL/SQL block is divided into three sections: the declarative part (for variables/constants), the executable part, and the exception handling part.
-
CEST
-
CAST
-
CUST
-
None of above
B
Correct answer
Explanation
CAST is a standard SQL function used to convert a value from one data type to another, which is used within SQL statements.
-
IF
-
IF THEN ELSE IF
-
EXIT WHEN
-
GO TO
C
Correct answer
Explanation
The EXIT WHEN statement is used in PL/SQL loops to terminate the loop execution immediately when a specific condition is met.
-
IF
-
IF THEN ELSE IF
-
EXIT WHEN
-
GO TO
D
Correct answer
Explanation
The GOTO statement allows the program to jump unconditionally to a specified label within the same block.
B
Correct answer
Explanation
PL/SQL data types are generally classified into two categories: scalar data types and composite (or complex) data types.
-
If
-
If then else if
-
For
-
Error
D
Correct answer
Explanation
In PL/SQL, an exception is an error condition that occurs during the execution of a program, which interrupts the normal flow.
-
declarative
-
executable
-
exception handling
-
none of above
A
Correct answer
Explanation
All variables, constants, and user-defined exceptions must be declared in the declarative section of the PL/SQL block.
A
Correct answer
Explanation
Exceptions in PL/SQL are classified into two types: predefined (system) exceptions and user-defined exceptions.
-
Atomicity
-
Consistency preservation
-
Isolation
-
Durability or permanency
-
Schema definition
D
Correct answer
Explanation
This property of a transaction states that the changes applied to the database by a committed transaction must persist in the database.
-
Concurrency
-
Referential Integrity
-
Functional Dependency
-
Normalisation
-
Entity Integrity
A
Correct answer
Explanation
This property of transaction refers to multiple transactions, accessing the same database at the same time.
-
Event
-
Condition
-
Action
-
Relationships
-
Alerts
A
Correct answer
Explanation
This component in the active database rules is the one that determines whether the rule action should be executed or not.