36.
What are the advantages of using a PACKAGE?
- Avoid having to bind a large number of DBRM members into a plan
- Avoid cost of a large bind
- Avoid the entire transaction being unavailable during bind and automatic rebind of a plan
- Minimize fallback complexities if changes result in an error.
37.
What is a collection?
A user defined name that is the anchor for packages. It has not physical existence. Main usage is to group packages. In SPUFI suppose you want to select max. of 1000 rows , but the select returns only 200 rows.
38.
What are the 2 sqlcodes that are returned?
100 ( for successful completion of the query ), 0 (for successful COMMIT if AUTOCOMMIT is set to Yes).
39.
How do I create a table MANAGER ( EMP#, MANAGER) where MANAGER is a foreign key which references to EMP# in the same table? Give the exact DDL.
First CREATE MANAGER table with EMP# as the primary key. Then ALTER it to define the foreign key. When is the authorization check on DB2 objects done - at BIND time or run time? At run time.
40.
When would you prefer to use VARCHAR?
When a column which contains long text, e.g. remarks, notes, may have in most cases less than 50% of the maximum length.