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
C
Correct answer
Explanation
For database tables, a maximum of 9 indexes is generally recommended and supported in SAP systems. While it's technically possible to create more, having too many indexes can degrade performance during data modification operations (INSERT, UPDATE, DELETE) because each index must be maintained. Option A (2) is too restrictive. Option B (6) is not the standard limit. Option D (None) is incorrect - indexes are allowed.
-
Se14
-
Se11
-
Se16n
-
All the Above
A
Correct answer
Explanation
SE14 is the SAP transaction code for the Database Utility, which is used for database-specific operations on tables such as activating, deleting, and checking database objects. SE11 is for the ABAP Dictionary (data dictionary maintenance), and SE16N is the Data Browser for viewing table contents.
-
se16
-
/nn
-
se16n
-
All the Above
C
Correct answer
Explanation
In SAP ABAP Dictionary, a transparent table can include a maximum of 9 include structures. This is a technical limitation of the database table definition. Include structures allow you to reuse structure definitions across multiple tables, but you cannot exceed 9 includes in a single table.
-
sm30
-
/nn
-
sap_maintain
-
All the Above
A
Correct answer
Explanation
SM30 is the SAP transaction code for the Table Maintenance Generator, which is used to create and maintain table views for custom tables. This tool allows users to create, edit, and display data through views. The other options (/nn and sap_maintain) are not standard SAP transaction codes.
D
Correct answer
Explanation
Views in ABAP Dictionary cannot have their own indexes. Indexes exist only on the underlying database tables that the view references. The view itself is a virtual table - when you query a view, SAP retrieves data from the base tables using their indexes. Therefore, views have 'None' (zero) indexes.
C
Correct answer
Explanation
In SAP ABAP guidelines, it is recommended to have a maximum of 9 secondary indexes per database table. Exceeding this limit can severely degrade database performance during write operations (INSERT, UPDATE, DELETE), as the database must update all associated indexes.
-
update
-
select
-
delete
-
merge
B
Correct answer
Explanation
The SELECT statement is used to retrieve data from database tables. UPDATE is for modifying data, DELETE for removing data, and MERGE for conditional operations.
-
select
-
update
-
delete
-
merge
A
Correct answer
Explanation
The SELECT statement is specifically designed to extract or retrieve data from database tables. UPDATE modifies existing data, DELETE removes data, and MERGE combines operations.
-
notnull
-
NOT NULL
-
primary key
-
unique key
A
Correct answer
Explanation
'NOT NULL' is a SQL constraint, while 'notnull' (lowercase without space) is not the correct syntax. NULL constraints must be uppercase in SQL standard syntax.
-
fasdfs
-
fas
-
fasd
-
fasdfsadf
D
Correct answer
Explanation
RTRIM removes trailing spaces from a string. When applied to 'fasdfsadf ' (with trailing spaces), it returns 'fasdfsadf' with all trailing spaces removed. Options A, B, and C incorrectly truncate characters from the end of the actual string content rather than just removing spaces.
-
123,124
-
-123.-124
-
123,-124
-
-123, 124
D
Correct answer
Explanation
CEIL(-123.50) = -123 (ceiling rounds toward positive infinity, so -123.50 rounds up to -123). CEIL(123.50) = 124 (ceiling rounds up from 123.50 to 124). The correct result is -123, 124.
-
KNOWMIND
-
WORKSM
-
WORKSMAX
-
MAXWORKS
C
Correct answer
Explanation
In Oracle SQL, SUBSTR with a negative index counts backward from the end of the string. SUBSTR('MINDWORKS',-5,6) starts at 'W' and returns 'WORKS'. SUBSTR('KNOWMAX',-3,4) starts at 'M' and returns 'MAX'. Concatenating these results yields 'WORKSMAX'.
-
Data Defenition Language
-
Data Manipulation Language
-
Data Updation Language
-
Data Selection Language
B
Correct answer
Explanation
UPDATE is a Data Manipulation Language (DML) command that modifies existing data in database tables. DML includes INSERT, UPDATE, DELETE, and SELECT operations that manipulate data. DDL includes CREATE, ALTER, DROP commands that define database structure.