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
-
Store
-
ADD RECORD
-
STORE RECORD
-
INSERT RECORD
C
Correct answer
Explanation
STORE RECORD is the correct statement in Model 204 for adding new records to a file. The STORE command combined with RECORD specifies that a complete record should be stored.
-
INSERT
-
ADD
-
STORE
-
INSERT INTO
B
Correct answer
Explanation
The ADD statement is used to add new field values to an existing record in Model 204. This is different from STORE which creates new records.
-
TABLE A
-
TABLE B
-
TABLE C
-
TABLE D
B
Correct answer
Explanation
In Model 204 file architecture, Table B contains the actual record data, including all retrievable field values for the records in the file.
-
DELETE RECORD
-
DELETE
-
DELETE FIELD
-
REMOVE
B
Correct answer
Explanation
DELETE is the M204 statement that removes fields from a record. DELETE RECORD would remove the entire record, not just fields. DELETE FIELD and REMOVE are not valid M204 syntax for field removal.
A
Correct answer
Explanation
FPC (Find and Print Count) is the M204 command that counts and displays the number of records satisfying a condition. WOL is for ordered retrieval, FCOUNT is not a valid M204 command, and FRC is not a standard command.
-
'ACCOU'
-
NULL STRING
-
ACCO'
-
COUNT'
-
The FOR EACH RECORD IN ORDER BY statement retrieves and loops only on the first occurrence of a field in a record
-
The FOR EACH RECORD IN ORDER BY statement loops only on the first occurrence of a field in a record
-
The FOR EACH RECORD IN ORDER BY statement retrieves and loops on all the occurrence of a field in a record
-
The FOR EACH RECORD IN ORDER BY statement retrieves and loops on only the last occurrence of a field in a record
A
Correct answer
Explanation
The FOR EACH RECORD IN ORDER BY statement both retrieves and loops through only the FIRST occurrence of a field in each record, not all occurrences. This is important when you want to process unique records without duplicate field values. Option A correctly describes this behavior. Options B, C, and D are incorrect because the statement doesn't just loop without retrieval, doesn't process all occurrences, and isn't limited to the last occurrence.
-
The count obtained by the COUNT OCCURRENCES statement.
-
The Count obtained from counting the number of 'IN' in your M204 Code.
-
Counting of the M204 Database files used in the Code
-
Count obtained by the Count Statement.
A
Correct answer
Explanation
The COUNT IN clause refers specifically to the count value generated by the COUNT OCCURRENCES statement, not to counting 'IN' keywords or database files. This allows you to use the occurrence count in subsequent operations. Option A correctly identifies this relationship. Options B and D are incorrect because COUNT IN doesn't count keywords or use a generic Count statement. Option C is incorrect because it doesn't count database files.
-
ADD statement
-
CHANGE statement
-
STORE RECORD statement
-
All the Above
D
Correct answer
Explanation
The VALUE IN statement can be used with ADD, CHANGE, and STORE RECORD statements in Model 204, making it versatile for field manipulation. It allows you to reference specific values within these operations. Option D correctly states that VALUE IN works with all three statement types. Options A, B, and C are incorrect because VALUE IN isn't limited to just one of these statements - it works with all of them.
-
CHANGE FULLNAME TO NULL
-
CHANGE FULLNAME TO ‘NULL’
-
CHANGE FULLNAME TO 0
-
DELETE FULLNAME
D
Correct answer
Explanation
The statement 'CHANGE FULLNAME TO' with no value specified is equivalent to 'DELETE FULLNAME' - it removes the field from the record. This is a shorthand way to delete a field without explicitly using the DELETE command. Option D correctly identifies this equivalence. Options A, B, and C are incorrect because they attempt to assign specific values (NULL as keyword, string, or number) when the actual operation is deletion.
-
PLACE RECORDS IN label IN [LIST] listname
-
PLACE RECORDS IN label ON [LIST] listname
-
PLACE RECORDS ON label ON [LIST] listname
-
PLACE RECORDS ON label IN [LIST] listname
B
Correct answer
Explanation
The correct syntax in Model 204 User Language for placing records onto a list is PLACE RECORDS IN label ON [LIST] listname.
A
Correct answer
Explanation
The ADD statement in Model 204 can only be used to add new field values to a record within the FOR EACH RECORD loop. This restriction ensures that additions are properly context-aware and associated with the correct record. Option A (True) correctly states this limitation. Option B (False) is incorrect because the ADD statement cannot be used outside the loop context.
-
CHANGE statement
-
UPDATE statement
-
DELETE statement
-
ADD statement
A
Correct answer
Explanation
In Model 204, the CHANGE statement modifies an existing field value, or adds the field and its value to the record if the field does not already exist in that record.
-
FOR EACH
-
FOR WHICH
-
FOR EACH RECORD IN LOOP
-
None of the above
B
Correct answer
Explanation
In Model 204 User Language, when you want to loop through and process records that are stored in a list, you must use the FOR WHICH statement to iterate over the list members.
-
LIST$
-
LIST listname
-
Listname
-
None of the above
A
Correct answer
Explanation
LIST$ is the correct syntax to reference a list collection in a FIND condition. The $ symbol is the standard identifier for list variables in this system, while other options either use incorrect keywords or incomplete syntax.