File contains 5 records say D,E,F,C,A-I want to copy D and A records only by using file-aid?
Correct Answer
Go to file-aid copy optionEnter the from dataset to be copied and to dataset to which you want to copygo to options Enter 0 at Initial records to skip fieldThen enter 3 at the no of records to skip field and 1 to no of records to selectpress enter and PF3
Correct Answer: 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
2. What do you accomplish by GROUP BY ... HAVING clause?
Correct Answer: 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
3. What is the difference between primary key & unique index ?
Correct Answer: 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
Correct Answer: While allocating KSDS Datasets, free space is declared at regular intervals at the time of initial loading This is done because this free space is utilized for keeping the data arranged in sequence physically, even though inserted randomly
5. What is the need to code COMMITS in batch programs?
Correct Answer: COMMIT statements are used to release locks which are required for that unit of work, and then permit a new unit of work In other words, if COMMITS are not coded in the program and the program has been sent for execution, then while processing, in place of just going back to a few inserts since the nearest commit, the program has to go back to the inserts which were made during the entire run of the program This extra process takes around twice or thrice the time taken normally
6. My SQL statement SELECT AVG(SALARY) FROM EMP yields inaccurate results. Why?
Correct Answer: The number of distinct values for a column is called index cardinality DB2's RUNSTATS utility analyzes column value redundancy to determine whether to use a tablespace or index scan to search for data