SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
Sample Database
HP NonStop SQL/MX Reference Manual—523725-004
D-11
PARTSUPP Table
PARTSUPP Table
This statement creates the PARTSUPP table:
CREATE TABLE samdbcat.invent.partsupp 
 ( partnum NUMERIC (4) UNSIGNED
 NO DEFAULT
 NOT NULL NOT DROPPABLE 
 HEADING 
'Part/Num'
 ,suppnum NUMERIC (4) UNSIGNED
 NO DEFAULT
 NOT NULL NOT DROPPABLE 
 HEADING 
'Supp/Num'
 ,partcost NUMERIC (8, 2)
 NO DEFAULT
 NOT NULL NOT DROPPABLE 
 HEADING 
'Part/Cost'
 ,qty_received NUMERIC (5) UNSIGNED
 DEFAULT 0 
 NOT NULL NOT DROPPABLE 
 HEADING 
'Qty/Rec'
 ,PRIMARY KEY (partnum,suppnum) NOT DROPPABLE
 );
This statement creates the XSUPORD index:
CREATE INDEX xsupord
 ON partsupp (
 suppnum
 );
This statement creates the VIEW207 view:
CREATE VIEW view207 (
 partnumber
 ,partdescrpt
 ,suppnumber
 ,supplrname
 ,partprice
 ,qtyreceived
 )
 AS SELECT
 x.partnum
 ,partdesc
 ,x.suppnum
 ,suppname
 ,partcost
 ,qty_received
 FROM
 samdbcat.invent.partsupp x
 ,samdbcat.sales.parts p
 ,samdbcat.invent.supplier s
 WHERE










