IBM Books

Call Level Interface Guide and Reference

Catalog Functions Example

In the browser.c sample application:

Output from the browser.c sample is shown below, relevant segments of the sample are listed for each of the catalog functions.

Enter Search Pattern for Table Schema Name:
STUDENT
Enter Search Pattern for Table Name:
%
### TABLE SCHEMA              TABLE_NAME                TABLE_TYPE
    ------------------------- ------------------------- ----------
1   STUDENT                   CUSTOMER                  TABLE
2   STUDENT                   DEPARTMENT                TABLE
3   STUDENT                   EMP_ACT                   TABLE
4   STUDENT                   EMP_PHOTO                 TABLE
5   STUDENT                   EMP_RESUME                TABLE
6   STUDENT                   EMPLOYEE                  TABLE
7   STUDENT                   NAMEID                    TABLE
8   STUDENT                   ORD_CUST                  TABLE
9   STUDENT                   ORD_LINE                  TABLE
10  STUDENT                   ORG                       TABLE
11  STUDENT                   PROD_PARTS                TABLE
12  STUDENT                   PRODUCT                   TABLE
13  STUDENT                   PROJECT                   TABLE
14  STUDENT                   STAFF                     TABLE
Enter a table Number and an action:(n [Q | C | P | I | F | T |O | L])
|Q=Quit     C=cols     P=Primary Key I=Index   F=Foreign Key |
|T=Tab Priv O=Col Priv S=Stats       L=List Tables           |
1c
Schema: STUDENT  Table Name: CUSTOMER
   CUST_NUM, NOT NULLABLE, INTeger (10)
   FIRST_NAME, NOT NULLABLE, CHARacter (30)
   LAST_NAME, NOT NULLABLE, CHARacter (30)
   STREET, NULLABLE, CHARacter (128)
   CITY, NULLABLE, CHARacter (30)
   PROV_STATE, NULLABLE, CHARacter (30)
   PZ_CODE, NULLABLE, CHARacter (9)
   COUNTRY, NULLABLE, CHARacter (30)
   PHONE_NUM, NULLABLE, CHARacter (20)
>> Hit Enter to Continue<<
 
1p
Primary Keys for STUDENT.CUSTOMER
 1  Column: CUST_NUM            Primary Key Name: = NULL
>> Hit Enter to Continue<<
 
1f
Primary Key and Foreign Keys for STUDENT.CUSTOMER
  CUST_NUM  STUDENT.ORD_CUST.CUST_NUM
      Update Rule SET NULL , Delete Rule: NO ACTION
>> Hit Enter to Continue<<


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]