What is the FREE command?

The FREE command can be used to delete plans and/or packages no longer Needed.

DB2 Comments Off

What is DCLGEN?

A DCLGEN stands for declarations generator; it is a facility to generate DB2 SQL data structures in COBOL or PL/1 programs.

DB2 Comments Off

What is the SQL Communications Area and what are some of its key fields?

It is a data structure that must be included in any host-language program using SQL It is used to pass feedback about the SQL operations to the program Fields are return codes, error messages, Handling codes and warnings.

DB2 Comments Off

What is the significance of the CURSOR WITH HOLD clause in a cursor declaration?

The clause avoids closing the cursor and repositioning it to the last row processed when the cursor is reopened.

DB2 Comments Off

What is the difference between Static and Dynamic SQL?

Static SQL is hard-coded in a program when the programmer knows the statements to be executed For dynamic SQL the program must dynamically allocate memory to receive the query results.

DB2 Comments Off

What are the functions of Bind?

BIND mainly performs two things: Syntax checking and Authorization checking. It binds together all packages into an application plan hence the name BIND. Apart from this bind has optimizer as a subcomponent. Its function is to determine the optimum access strategy.

DB2 Comments Off

What is a correlated subquerry?

In a subquerry, if the outer query refers back to the outcome of inner query it is called correlated subquerry. That’s why the outer query is evaluated first unlike an ordinary subquerry

DB2 Comments Off

What is the difference between JOIN and UNION?

JOIN is used to retrieve data from different tables using a single SQL statement. UNION is used to combine the results of two or more SQL queries.

DB2 Comments Off

When can you be sure that a query will return only one row?

When you use the primary key and only the primary key in the WHERE clause.

DB2 Comments Off

What should be specified along with a cursor in order to continue updating process after COMMIT?

With Hold option.

DB2 Comments Off