Example: Using a Trigger to Auto-Generate a Key Value
This example employs a trigger program to automatically generate a unique employee number every time a new record is added to an Employee Master File called EMPLOYEE. The file contains fields you would expect to see in a simple employee file, such as employee number, name, address, job code, salary, etc. Figure 6.1 shows the complete layout for the file.
Figure 6.1: This Employee Master File is used to demonstrate trigger usage.
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/