- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Mandalika has Published 473 Articles
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
8K+ Views
Problem: A COBOL-DB2 program takes the data from an input file having 1000 records and inserts the data in a DB2 table. The program failed after 432nd record. How will you implement restart logic?SolutionThe restart logic can be implemented in a COBOL-DB2 program by fixing a commit frequency. If we ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
204 Views
Problem: Explain the difference between Multi-index access and Index-only access paths used by DB2 Optimizer. Give an example for both.SolutionThe Index-only access and Multi-index access are the types of access path which the DB2 optimizer chooses in order to fetch the query results. The Index-only access paths are used when ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
2K+ Views
The UNION in DB2 is used to merge two or more SELECT statements. The SELECT statements can be on a single table or on multiple tables. Each SELECT statement is processed individually and their results are combined to give us the final result rows.The UNION statement will eliminate the duplicate ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
127 Views
The EXECUTE IMMEDIATE and EXECUTE with PREPARE could not be used for SELECT query. For the SELECT query, we have a fixed list SELECT in which the column to be fetched remains fixed and it cannot be changed.For example, if we want to select the orders placed on 14-08-2020. Then ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
571 Views
The EXECUTE IMMEDIATE and EXECUTE PREPARE are the forms of dynamic SQL. In case of EXECUTE immediate, we can give the SQL statement in the host variable and pass this host variable in EXECUTE IMMEDIATE.Following example demonstrates these forms.Example01 WS-SQL-DECLARE 05 WS-SQL-LEN PIC S9(04) COMP. 05 WS-SQL-QUERY ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
990 Views
A static SQL is hardcoded in COBOL-DB2 program and the SQL query cannot change during the program execution. We can only change the value of the host variables. In the case of DYNAMIC SQL, we can change the columns, tables and predicates in the COBOL-DB2 program in run time.For example, ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
109 Views
The QBLOCK_TYPE column of the PLAN_TABLE mainly gives the information about the type of query. It can have the value as CORSUB which indicates that the query is Correlated subquery and NCOSUB indicates that the query is Non-correlated subquery.The JOIN_TYPE column indicates the type of join used in the query. ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
433 Views
The PLAN_TABLE in DB2 contains details of the access paths used by the optimizer from the EXPLAIN statement. This table gives much information about the PLAN having DB2 SQL statements.ACCESSTYPE is one of the columns of PLAN_TABLE which gives details regarding the access type. The values which can be present ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
246 Views
A sequence is used to generate the unique ID automatically. We can define a column in the DB2 table as type SEQUENCE. This will enable DB2 to automatically generate a unique ID for every new row inserted in the table. The auto ID generated by the DB2 remains unique throughout ... Read More
![Mandalika](https://www.tutorialspoint.com/assets/profiles/223769/profile/60_143952-1595686763.jpg)
Mandalika
3K+ Views
The subquery is a nested query. When this subquery is executed only once and the result of this subquery is used to extract the data in the main query, then this type of subquery is known as UNCORRELATED subquery. On the other hand, when a subquery refers to the main ... Read More