Practice Question and Answer

Q: What is the difference between primary key & unique index ? 1218 0

  • Show AnswerHide Answer
  • Workspace

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 0

  • Show AnswerHide Answer
  • Workspace

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 0

  • Show AnswerHide Answer
  • Workspace

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 0

  • Show AnswerHide Answer
  • Workspace

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 0

  • Show AnswerHide Answer
  • Workspace

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 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

An application plan or package is generated by the bind to define an access path.

Q: What is a DB2 bind? 1879 0

  • Show AnswerHide Answer
  • Workspace

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 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

USING HOST VARIABLE we can pass data from COBOL to DB2

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully