Db2_quiz_for_cbe13mj6_batch

25 Questions | Attempts: 232
Share

SettingsSettingsSettings
Database Quizzes & Trivia

Questions and Answers
  • 1. 

    Write a simple join query? t1 : emp(emp_id,name,sal,desi) t2 : project(project_id,proj_name,emp_id)

  • 2. 

    Max() function can be used in char data type?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 3. 

    Sqlcode =-811

    • A.

      Select query fetches more than one row

    • B.

      Trying to insert null value to the table

    • C.

      Timestamp mismatch error

    • D.

      Dbrm member not found

    Correct Answer
    A. Select query fetches more than one row
  • 4. 

    Sqlcode = +100

    • A.

      Query executed successfully

    • B.

      End of table or no record found

    • C.

      End of table reached

    • D.

      No record found in the table

    Correct Answer
    B. End of table or no record found
  • 5. 

    NULL indicator variable pic clause?

    • A.

      Pic s9(4) comp-3

    • B.

      Pic s9(4) comp.

    • C.

      Pic 9(04).

    • D.

      S9(8) comp.

    Correct Answer
    B. Pic s9(4) comp.
  • 6. 

    Which utility is used to execute db2 program?

    • A.

      Ikjeft01

    • B.

      Ikjeft02

    • C.

      Ikfet01

    • D.

      Iefbr14

    • E.

      Idcams

    Correct Answer
    A. Ikjeft01
  • 7. 

    Trying to fetch the cursor wothout opening it?

    • A.

      -501

    • B.

      -503

    • C.

      -811

    • D.

      -503

    Correct Answer
    A. -501
  • 8. 

    Which of the following utility   is used to take backup of the db2table?

    • A.

      Load

    • B.

      Unload

    • C.

      Reorg

    • D.

      Backup

    Correct Answer
    B. Unload
  • 9. 

    LIke statement can be used in numeric datatypes fields?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
  • 10. 

    Write a query to get the 4th maximum salary employee details from table? table name :emp

    Correct Answer
    select * from emp a where 4=(select count(distinct salary) from emp b where b.salary>a.salary)
  • 11. 

    Write a query to get the total sal for each project?

    • A.

      Select total(sal) from emp group by project_name

    • B.

      Select sum(sal) from emp

    • C.

      Select count(sal) from emp group by project_name

    • D.

      Select sum(sal) from emp group by project_name

    • E.

      Select sum(sal) from emp order by project_name

    Correct Answer
    D. Select sum(sal) from emp group by project_name
  • 12. 

    What is the table name to list the structure of the db2 table?

    • A.

      Sysibm.systables

    • B.

      Sysibm.syscolumns

    • C.

      Sysibm.syskeys

    • D.

      Sysibm.syscols

    Correct Answer
    B. Sysibm.syscolumns
  • 13. 

    Package is executable ?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
  • 14. 

    Write a  query to insert null value to the table? emp_id,emp_name,emp_sal

    • A.

      Insert into emp(emp_id,emp_name) values(100,'abc')

    • B.

      Insert into emp values(100,'abc')

    • C.

      Insert into emp(emp_id,emp_name,emp_sal) values(100,'abc',' ')

    • D.

      Insert into emp values(100,' ')

    Correct Answer
    A. Insert into emp(emp_id,emp_name) values(100,'abc')
  • 15. 

    Input to the bind ?

    • A.

      Sql statements

    • B.

      Cobol statements

    • C.

      Cobol &sql statements

    • D.

      None

    Correct Answer
    A. Sql statements
  • 16. 

    If any records deleted in parent table the corresponding records should get deleted?

    • A.

      On delete cascade

    • B.

      On delete restrict

    • C.

      On delete set to null

    • D.

      None

    • E.

      On delete update

    Correct Answer
    A. On delete cascade
  • 17. 

    UNION ALL eliminate the duplicate records in the result set?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
  • 18. 

    What is the physical storage length of each of the following DB2 data types:   TIMESTAMP

    • A.

      10

    • B.

      26

    • C.

      8

    • D.

      4

    Correct Answer
    A. 10
  • 19. 

    What is the cobol pic clause for db2 datatype decimal(9,2)?

    • A.

      Pic s9(9)v99 comp-3.

    • B.

      Pic s9(7)v9(2) comp-3

    • C.

      Pic s9(7).9(2) comp-3.

    • D.

      Pic s9(7)v9(2) comp.

    • E.

      Pic 9(7)v9(2) comp-3.

    Correct Answer
    B. Pic s9(7)v9(2) comp-3
  • 20. 

    Emp_name  varchar(25) cobol pic clause?

    • A.

      01 emp-name. 05 emp-name-len pic s9(4) comp.05 emp-name-text pic x(25).

    • B.

      01 emp-name. 05 emp-name-len pic s9(4) comp.05 emp-name-text pic 9(25).

    • C.

      01 emp-name. 49 emp-name-len pic s9(4) comp-3.49 emp-name-text pic x(25).

    • D.

      01 emp-name .49 emp-name-text pic x(25).49 emp-name-len pic s9(4) comp.

    • E.

      01 emp-name. 49 emp-name-len pic s9(4) comp.49 emp-name-text pic x(25).

    Correct Answer
    E. 01 emp-name. 49 emp-name-len pic s9(4) comp.49 emp-name-text pic x(25).
  • 21. 

    What is the correct order steps in cursor?

    • A.

      Declare,open,close

    • B.

      Declare,open,close,fetch

    • C.

      Declare,open,fetch,close

    • D.

      Open,fetch,close

    • E.

      Declare,open,fetch

    Correct Answer(s)
    A. Declare,open,close
    C. Declare,open,fetch,close
    E. Declare,open,fetch
  • 22. 

    Which command is used to give access permission to the table?

    • A.

      Grant

    • B.

      Select

    • C.

      Revoke

    • D.

      Commit

    • E.

      Permit

    Correct Answer
    A. Grant
  • 23. 

    Declare cursor can be defined in procedure division?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 24. 

    DBRM?

    Correct Answer
    database request module
  • 25. 

    Sqlcode = -180?

    • A.

      Date,time,timestamp are invalid

    • B.

      Date,time,timestamp are valid

    • C.

      Null value fetching

    • D.

      Timestamp mismatch error

    • E.

      Time,timestamp are invalid

    Correct Answer
    A. Date,time,timestamp are invalid

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jun 20, 2014
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 24, 2014
    Quiz Created by
    Sanjaycts

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.