Practice Question and Answer
8Q: What is the difference between primary key & unique index ? 1218 05b5cc7dae4d2b41977751580
5b5cc7dae4d2b41977751580- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
Primary key : a relational database constraint. Primary key consists of one or more columns that uniquely identify a row in the table. For a normalized relation, there is one designated primary key. Unique index: a physical object that stores only unique values. There can be one or more unique indexes on a table.
Q: What do you accomplish by GROUP BY ... HAVING clause? 1049 05b5cc7dae4d2b4197775157f
5b5cc7dae4d2b4197775157f- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
GROUP BY partitions the selected rows on the distinct values of the column on which you group by. HAVING selects GROUPs which match the criteria specified
Q: What is the self-referencing constraint? 1809 05b5cc7dae4d2b4197775157e
5b5cc7dae4d2b4197775157e- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
A31. The self-referencing constraint limits in a single table the changes to a primary key that the related foreign key defines. The foreign key in a self referencing table must specify the DELETE CASCADE rule.
Q: File contains 5 records say D,E,F,C,A-I want to copy D and A records only by using file-aid? 1538 05b5cc7dae4d2b4197775157d
5b5cc7dae4d2b4197775157d- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
Go to file-aid copy option.Enter the from dataset to be copied and to dataset to which you want to copy.go to options. Enter 0 at Initial records to skip field.Then enter 3 at the no of records to skip field and 1 to no of records to select.press enter and PF3.
Q: My SQL statement SELECT AVG(SALARY) FROM EMP yields inaccurate results. Why? 1154 05b5cc7dae4d2b4197775157c
5b5cc7dae4d2b4197775157c- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
Because SALARY is not declared to have NULLs and the employees for whom the salary is not known are also counted.
Q: What is a DB2 plan? 1184 05b5cc7dae4d2b4197775157b
5b5cc7dae4d2b4197775157b- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
An application plan or package is generated by the bind to define an access path.
Q: What is a DB2 bind? 1879 05b5cc7dae4d2b4197775157a
5b5cc7dae4d2b4197775157a- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
A DB2 bind is a process that builds an access path to DB2 tables.
Q: How will u send data from a cobol file to db2 table? 1774 05b5cc7dae4d2b41977751579
5b5cc7dae4d2b41977751579- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
USING HOST VARIABLE we can pass data from COBOL to DB2

