This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What Is A Dbrm, Plan ? |
|
Answer» DBRM: Data BASE Request MODULE, has the SQL statements extracted from the host language PROGRAM by the pre-compiler. DBRM: Data Base Request Module, has the SQL statements extracted from the host language program by the pre-compiler. |
|
| 2. |
What Is Alter ? |
|
Answer» SQL COMMAND USED to CHANGE the DEFINITION of DB2 objects. SQL command used to change the definition of DB2 objects. |
|
| 3. |
How Does Db2 Determine What Lock-size To Use? |
|
Answer» 1. Based on the lock-size GIVEN while CREATING the tablespace 1. Based on the lock-size given while creating the tablespace |
|
| 4. |
What Are The Various Locking Levels Available? |
|
Answer» PAGE, TABLE, TABLESPACE PAGE, TABLE, TABLESPACE |
|
| 5. |
Where Do You Specify Them ? |
|
Answer» ISOLATION LEVEL is a PARAMETER for the BIND PROCESS. ISOLATION LEVEL is a parameter for the bind process. |
|
| 6. |
What Is The Difference Between Cs And Rr Isolation Levels? |
|
Answer» CS: RELEASES the lock on a page after use CS: Releases the lock on a page after use |
|
| 7. |
What Are The Isolation Levels Possible ? |
|
Answer» CS: Cursor Stability CS: Cursor Stability |
|
| 8. |
How Do You Do The Explain Of A Dynamic Sql Statement? |
|
Answer» 1. Use SPUFI or QMF to EXPLAIN the DYNAMIC SQL STATEMENT 1. Use SPUFI or QMF to EXPLAIN the dynamic SQL statement |
|
| 9. |
Explain Has Output With Matchcols = 0. What Does It Mean? |
|
Answer» A NON MATCHING INDEX SCAN if ACCESSTYPE = I. A non matching index scan if ACCESSTYPE = I. |
|
| 10. |
Where Is The Output Of Explain Stored? |
|
Answer» In userid.PLAN_TABLE In userid.PLAN_TABLE |
|
| 11. |
What Do You Need To Do Before You Do Explain? |
|
Answer» MAKE SURE that the PLAN_TABLE is CREATED under the AUTHID. Make sure that the PLAN_TABLE is created under the AUTHID. |
|
| 12. |
What Is Explain? |
|
Answer» EXPLAIN is USED to DISPLAY the access path as DETERMINED by the optimizer for a SQL statement. It can be used in SPUFI (for single SQL statement) or in BIND step (for embedded SQL ). EXPLAIN is used to display the access path as determined by the optimizer for a SQL statement. It can be used in SPUFI (for single SQL statement) or in BIND step (for embedded SQL ). |
|
| 13. |
How Can You Quickly Find Out The # Of Rows Updated After An Update Statement? |
|
Answer» CHECK the VALUE STORED in SQLERRD(3). Check the value stored in SQLERRD(3). |
|
| 15. |
How Is A Typical Db2 Batch Program Executed ? |
|
Answer» 1. Use DSN utility to run a DB2 batch program from NATIVE TSO. An example is SHOWN: 1. Use DSN utility to run a DB2 batch program from native TSO. An example is shown: |
|
| 16. |
Will Precompile Of An Db2-cobol Program Bomb, If Db2 Is Down? |
|
Answer» No. Because the PRECOMPILER does not REFER to the DB2 CATALOGUE TABLES. No. Because the precompiler does not refer to the DB2 catalogue tables. |
|
| 17. |
Is Declare Table In Dclgen Necessary? Why It Used? |
|
Answer» It not necessary to have DECLARE TABLE STATEMENT in DCLGEN. This is USED by the pre-compiler to validate the table-name, view-name, COLUMN name ETC., during pre-compile. It not necessary to have DECLARE TABLE statement in DCLGEN. This is used by the pre-compiler to validate the table-name, view-name, column name etc., during pre-compile. |
|
| 18. |
Is It Mandatory To Use Dclgen? If Not, Why Would You Use It At All? |
|
Answer» It is not mandatory to use DCLGEN. It is not mandatory to use DCLGEN. |
|
| 19. |
What Are The Contents Of A Dclgen? |
| Answer» | |
| 20. |
What Is Dclgen |
|
Answer» Declarations GENerator: USED to create the host LANGUAGE COPY books for the table DEFINITIONS. Also creates the DECLARE table. Declarations GENerator: used to create the host language copy books for the table definitions. Also creates the DECLARE table. |
|
| 21. |
What Is The Cobol Picture Clause For A Db2 Column Defined As Decimal(11,2)? |
|
Answer» PIC S9(9)V99 COMP-3. PIC S9(9)V99 COMP-3. |
|
| 22. |
What Is The Cobol Picture Clause Of The Following Db2 Data Types: Date, Time, Timestamp? |
|
Answer» DATE: PIC X(10) DATE: PIC X(10) |
|
| 23. |
What Is The Physical Storage Length Of Each Of The Following Db2 Data Types: Date, Time, Timestamp? |
|
Answer» DATE: 4bytes DATE: 4bytes |
|
| 24. |
How Do You Leave The Cursor Open After Issuing A Commit? ( For Db2 2.3 Or Above Only ) |
|
Answer» USE WITH HOLD option in DECLARE CURSOR statement. But, it has not effect in psuedo-conversational CICS programs. Use WITH HOLD option in DECLARE CURSOR statement. But, it has not effect in psuedo-conversational CICS programs. |
|
| 25. |
When You Commit, Is The Cursor Closed? |
|
Answer» Yes. Yes. |
|
| 26. |
Can You Have More Than One Cursor Open At Any One Time In A Program? |
|
Answer» Yes. Yes. |
|
| 27. |
Is Declare Cursor Executable? |
|
Answer» No. No. |
|
| 28. |
What Happens When You Say Open Cursor? |
|
Answer» If there is an ORDER BY clause, rows are FETCHED, sorted and made available for the FETCH statement. Other WISE simply the cursor is placed on the first ROW. If there is an ORDER BY clause, rows are fetched, sorted and made available for the FETCH statement. Other wise simply the cursor is placed on the first row. |
|
| 29. |
How Do You Specify And Use A Cursor In A Cobol Program? |
|
Answer» USE DECLARE CURSOR statement either in working storage or in procedure division(before OPEN cursor), to SPECIFY the SELECT statement. Then use OPEN, FETCH ROWS in a loop and finally CLOSE. Use DECLARE CURSOR statement either in working storage or in procedure division(before open cursor), to specify the SELECT statement. Then use OPEN, FETCH rows in a loop and finally CLOSE. |
|
| 30. |
How Would You Retrieve Rows From A Db2 Table In Embedded Sql? |
|
Answer» EITHER by USING the single ROW SELECT statements, or by using the CURSOR. Either by using the single row SELECT statements, or by using the CURSOR. |
|
| 31. |
What Is A Cursor? Why Should It Be Used? |
|
Answer» Cursor is a programming DEVICE that ALLOWS the SELECT to find a set of ROWS but return them one at a time. Cursor is a programming device that allows the SELECT to find a set of rows but return them one at a time. |
|
| 32. |
What Are Correlated Subqueries? |
|
Answer» A subquery in which the inner ( nested ) QUERY refers back to the table in the OUTER query. Correlated SUBQUERIES MUST be evaluated for each qualified row of the outer query that is REFERRED to. A subquery in which the inner ( nested ) query refers back to the table in the outer query. Correlated subqueries must be evaluated for each qualified row of the outer query that is referred to. |
|
| 33. |
Why Select * Is Not Preferred In Embedded Sql Programs? |
|
Answer» For THREE reasons:
For three reasons: |
|
| 34. |
What Is The Result Of This Query If No Rows Are Selected: |
|
Answer» SELECT SUM(SALARY) SELECT SUM(SALARY) |
|
| 35. |
Consider The Employee Table With Column Project Null Able. How Can You Get A List Of Employees Who Are Not Assigned To Any Project? |
|
Answer» SELECT EMPNO SELECT EMPNO |
|
| 36. |
What Do You Accomplish By Group By ... Having Clause? |
|
Answer» GROUP BY PARTITIONS the selected rows on the distinct values of the column on which you group by. GROUP BY partitions the selected rows on the distinct values of the column on which you group by. |
|
| 37. |
What Is The Meaning Of Underscore ( '-' ) In The Like Statement? |
|
Answer» MATCH for any SINGLE CHARACTER. Match for any single character. |
|
| 38. |
When Do You Use A Like Statement? |
|
Answer» To do partial SEARCH e.g. to search employee by name, you NEED not specify the COMPLETE name; using LIKE, you can search for partial STRING matches. To do partial search e.g. to search employee by name, you need not specify the complete name; using LIKE, you can search for partial string matches. |
|
| 39. |
What Is 'like' Used For In Where Clause? What Are The Wildcard Characters? |
|
Answer» LIKE is USED for PARTIAL string MATCHES. ‘%’ ( for a string of any character ) and ‘_’ (for any single character ) are the two wild card CHARACTERS. LIKE is used for partial string matches. ‘%’ ( for a string of any character ) and ‘_’ (for any single character ) are the two wild card characters. |
|
| 40. |
Is Between Inclusive Of The Range Values Specified? |
|
Answer» Yes. Yes. |
|
| 41. |
In The Where Clause What Is Between And In? |
|
Answer» BETWEEN SUPPLIES a RANGE of VALUES while IN supplies a LIST of values. BETWEEN supplies a range of values while IN supplies a list of values. |
|
| 42. |
What Is The Restriction On Using Union In Embedded Sql? |
|
Answer» It has to be in a CURSOR. It has to be in a CURSOR. |
|
| 43. |
What Is Union,union All? |
|
Answer» UNION : ELIMINATES duplicates UNION : eliminates duplicates |
|
| 44. |
What Is The Use Of Value Function? |
|
Answer» 1. AVOID -ve SQLCODEs by handling nulls and zeroes in computations 1. Avoid -ve SQLCODEs by handling nulls and zeroes in computations |
|
| 45. |
How Do You Concatenate The Firstname And Lastname From Emp Table To Give A Complete Name? |
|
Answer» SELECT FIRSTNAME || ‘ ‘ || LASTNAME FROM EMP; SELECT FIRSTNAME || ‘ ‘ || LASTNAME FROM EMP; |
|
| 46. |
My Sql Statement Select Avg(salary) From Emp Yields Inaccurate Results. Why? |
|
Answer» Because SALARY is not declared to have NULLS and the EMPLOYEES for whom the salary is not known are ALSO counted. Because SALARY is not declared to have NULLs and the employees for whom the salary is not known are also counted. |
|
| 47. |
Can You Use Max On A Char Column? |
|
Answer» YES. YES. |
|
| 48. |
What Are Aggregate Functions? |
|
Answer» Built-in MATHEMATICAL FUNCTIONS for USE in SELECT CLAUSE. Built-in mathematical functions for use in SELECT clause. |
|
| 49. |
How Do You Retrieve The First 5 Characters Of Firstname Column Of Db2 Table Emp ? |
|
Answer» SQL QUERY : SELECT SUBSTR(FIRSTNAME,1,5) FROM EMP; SQL Query : SELECT SUBSTR(FIRSTNAME,1,5) FROM EMP; |
|