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
-
Deferred consideration
-
Immediate consideration
-
Detached consideration
-
Action consideration
-
Reply consideration
B
Correct answer
Explanation
This consideration in the design and implementation of active databases states that the condition is evaluated as part of the same transaction, as the triggering event and is evaluated immediately.
-
Triggers
-
Cursor
-
Procedure
-
Assertion
-
Create Table
D
Correct answer
Explanation
This command in SQL is a predicate expressing a condition that we wish the database always to satisfy.
-
Select
-
From
-
Where
-
And
-
Like
C
Correct answer
Explanation
This clause of select command corresponds to the selection predicate of the relational algebra.
-
character function
-
date function
-
miscellaneous function
-
numeric function
A
Correct answer
Explanation
LPAD is an Oracle function that pads the left side of a character string with a specified set of characters. It operates on character data types.
-
Simple View
-
Complex View
-
Insert View
-
Read Only View
C
Correct answer
Explanation
Oracle supports Simple, Complex, and Read Only views. There is no standard object type called an Insert View.
-
join
-
natural query
-
outer query
-
nested query
D
Correct answer
Explanation
A subquery is a query nested inside another query, often referred to as a nested query or inner query.
-
Equi Join
-
Natural Join
-
Inner Join
-
Unconditional Join
B
Correct answer
Explanation
A Natural Join automatically joins tables based on columns with the same name and removes the duplicate columns from the result set.
-
substitutes NULL value for a given value in a query result
-
substitutes NULL value with a specified value in a query result
-
substitutes NULL value with '00' in a query result
-
substitutes space for NULL value in a query result
B
Correct answer
Explanation
The NVL function in Oracle replaces a NULL value with a specified expression or value.
-
delete table definition
-
delete information from tables
-
delete constraint on tables
-
delete index on tables
B
Correct answer
Explanation
TRUNCATE is a DDL command that removes all rows from a table while keeping the table structure intact.
-
Search Queued Language
-
Structured Query Language
-
Static Queried Language
-
Structure Quest Language
B
Correct answer
Explanation
SQL is used for searching and editing of records in Oracle.
-
SQL Query Compiler
-
DDL Compiler
-
DML Compiler
-
SQL Pre-Compiler
B
Correct answer
Explanation
It performs translations of DDL statements into schema definition called meta data in the DBMS catalog.
-
Mysql_errno()
-
Mysql_list_results()
-
Mysql__result()
-
Mysql_fetch_arrya()
B
Correct answer
Explanation
The function mysql_list_results() does not exist in the standard PHP MySQL extension. The others are valid or common misspellings of existing functions.
-
%ISOPEN
-
%FOUND
-
%NOTFOUND
-
%ROWCOUNT
-
%LIKE
E
Correct answer
Explanation
There is no such command used with cursor in Oracle.
-
Naming conflicts
-
Type conflicts
-
Domain conflicts
-
Error conflicts
-
Execution conflicts
B
Correct answer
Explanation
This type of conflict may arise in Oracle when EMPLOYEE may be an entity type in one schema and an attribute in another.
-
isRowInserted()
-
hasInserted()
-
isInserted()
-
rowInserted()
-
Inserted()
D
Correct answer
Explanation
rowInserted() method is present in the ResultSet interface and it retrieves whether the current row has had an insertion or not. So, this answer is correct.