salesdetail table  stores table

Appendix A: The pubs2 Database

sales table

The sales table contains store id, order numbers, and dates of sale in sales in the pubs2 database.

sales is defined as follows:

create table sales
(stor_id char(4) not null,
ord_num varchar(20) not null,
date datetime not null)

Its primary keys are stor_id and ord_num:

sp_primarykey sales, stor_id, ord_num

Its stor_id column is a foreign key to stores:

sp_foreignkey sales, stores, stor_id




Copyright © 2005. Sybase Inc. All rights reserved. stores table

View this book as PDF