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
-
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.
-
Display > Statements of Inventory > Stock Query
-
Display > Inventory Books > Stock Query
-
Display > Inventory Info > Stock Query
-
Display > Inventory Vouchers > Stock Query
A
Correct answer
Explanation
For stock query, we have to select display, then statements of inventory and then stock query. Stock query screen appears.
B
Correct answer
Explanation
F7 is clicked when group name is not needed to be modified. By clicking F7, the group name is skipped for faster alteration at multiple ledger screen.
-
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.
-
rowUpdated()
-
isUpdated()
-
hasUpdated()
-
Updated()
-
isRowUpdated()
A
Correct answer
Explanation
rowUpdated() method is present in the ResultSet interface and it retrieves whether the current row in the table has been updated or not. So, this is the correct choice.