Scenario: Random Customer


After the end of each month company runs a bonanza gift for its registered customers. Each month their application will randomly pick the name of one registered customer to be rewarded with a bonanza gift.

To support the above, the following database objects are required:


Solution


Please note the order of CREATE statements:


Demonstrated Features



This demonstrates the ability of DB2 9.7 to create objects tolerant of certain errors, like a missing object.

After running the SQL statements, you will see several WARNING in the Console - lower right panel. Despite the warning messages, the commands did work. Warnings were returned to inform you that dependent objects have not yet been created.