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
A
Correct answer
Explanation
Transaction code LBWG is used in SAP BW to delete setup tables for DataSource extract structures. RSA7 is for delta queue monitoring, LBWE for maintaining extract structures, and SE11 is the ABAP Dictionary transaction.
B
Correct answer
Explanation
SCUO is the SAP transaction code used to compare tables across different systems or clients. It allows users to identify structural and data differences between database tables for validation and troubleshooting.
D
Correct answer
Explanation
SE49 is the transaction code in SAP used to manipulate tables behind other transaction codes. SE16 is for data browsing, SE26 is for ABAP dictionary, and SE51 is for screen painter - none of these directly manipulate table data like SE49 does.
-
It is NOT possible to switch unless no active transaction exists in UNDO1.
-
It is possible to switch to UNDO2, but current active transactions will abort.
-
It is possible to switch to UNDO2; current active transactions will be automatically migrated to UNDO2.
-
It is possible to switch to UNDO2; only current active transactions will continue to execute inside UNDO1.
D
Correct answer
Explanation
When switching undo tablespaces in Oracle, you can switch to a new undo tablespace while active transactions continue using the old one. Only new transactions will use the new undo tablespace. Active transactions will complete in UNDO1 until they finish or the undo tablespace is taken offline.
-
It is NOT possible to switch unless no active transaction exists in UNDO1.
-
It is possible to switch to UNDO2, but current active transactions will abort.
-
It is possible to switch to UNDO2; current active transactions will be automatically migrated to UNDO2.
-
It is possible to switch to UNDO2; only current active transactions will continue to execute inside UNDO1.
D
Correct answer
Explanation
When switching undo tablespaces, Oracle allows active transactions in the old undo tablespace (UNDO1) to complete normally. New transactions use UNDO2, but existing ones continue in UNDO1 until they commit or rollback. This is standard Oracle behavior - you don't need to wait for all transactions to complete before switching.
-
Using lookup() function
-
Using Generate Records component
-
Using re_index() function
-
Using next_in_sequence() function
D
Correct answer
Explanation
The next_in_sequence() function generates unique sequential numbers, which is the standard way to create surrogate keys in Ab Initio for maintaining unique identifiers across records.
-
Inner Join
-
Explicit Join ( record-required 0 = true, record-required 1 = true )
-
Explicit Join ( record-required 0 = false, record-required 1 = true )
-
Explicit Join ( record-required 0 = true, record-required 1 = false )
C
Correct answer
Explanation
Setting record-required 0 to false allows unmatched records from In0 to pass through (like a left outer join), while record-required 1 = true requires matches from In1. This gives all matching records plus unmatched In0 records.
-
Char >> number
-
Char >> date
-
Number >> varchar2
-
Date >> varchar2
A,B,C,D
Correct answer
Explanation
All options are valid implicit data type conversions in many database systems: Char can implicitly convert to number (when numeric string), Char to date (when in date format), Number to varchar2, and Date to varchar2. These conversions happen automatically without explicit CAST or CONVERT functions.
-
CONCAT
-
MOD
-
ROUND
-
CONVERSION FUNCTION
A,B,C,D
Correct answer
Explanation
All listed options are single-row functions in SQL: CONCAT (string concatenation), MOD (modulo operation), ROUND (numeric rounding), and conversion functions (TO_CHAR, TO_DATE, etc.) all operate on individual row values rather than aggregating across multiple rows like aggregate functions.
A
Correct answer
Explanation
In Livelink WCM, CQL (Content Query Language) abstracts database access, allowing developers to query content objects without being directly dependent on the underlying physical database schema.
-
Continual Query Language
-
Counted Query Language
-
Continous Query Language
-
None of the Above
D
Correct answer
Explanation
CQL stands for Continuous Query Language, which is used for querying real-time data streams. Since "Continuous Query Language" is misspelled as "Continous" in option 525784, "None of the Above" is correct.
-
By using multiple <property> elements inside the <class> element.
-
By using multiple <field> elements inside the <class> element.
-
By using multiple <coulmn> elements inside the <class> element.
-
none of the above
A
Correct answer
Explanation
In Hibernate mapping files, individual properties of a persistent class are mapped to table columns using multiple elements nested inside the element. Each element defines the column mapping, type, and other attributes for a single class property.
C
Correct answer
Explanation
The EXISTS operator is specifically designed to test for the existence of rows returned by a subquery and cannot function without one. IN, BETWEEN, and LIKE can operate on literal values or lists.
-
COMMIT
-
UPDATE
-
SAVEPOINT
-
SET TRANSACTIONS
A,C,D
Correct answer
Explanation
Transaction control language (TCL) commands manage changes made by DML statements. COMMIT, SAVEPOINT, and SET TRANSACTION are TCL commands, whereas UPDATE is a Data Manipulation Language (DML) command.