OpenLink Software Server 4.5 Manual Do Utilizador

Página de 28
Virtuoso 4.5 Application and Integration Reviewers Guide  
Copyright ©2006 OpenLink Software 
 
 
16 
Figure 14 – Demo AUDIO_CASSETTE User Defined Type 
 
Step 3. 
Once the UDT has been defined, it can then be used in stored procedures, 
tables or views.  For example, in the create table below Instead of specifying 
BookProductType as the data type you can specify 
DEMO..AUDIO_CASSETTE as show below in Figure 15 – Create Table 
Statement using UDT.
 
Figure 15 – Create Table Statement using UDT 
CREATE TABLE DEMO..BOOK_VIEW_DETAILS 
    (ProductID         integer NOT NULL, 
    BookProductType   DEMO..AUDIO_CASSETTE ); 
 
Step 4. 
Verify the table referencing the UDT by navigating to the Database TAB, 
selecting Schema Objects and expanding the Demo database and selecting 
the Tables as show below in Figure 16 – Demo Table 
BOOK_VIEW_DETAILS.     
Select the details of the table by clicking on the 
Definitions as shown in Figure 17 – Schema Object 
BOOK_VIEW_DETAILS Definitions.