sales table

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

Table A-6 lists the contents of sales:

Table A-6: sales table

stor_id

ord_num

date

5023

AB-123-DEF-425-1Z3

Oct 31 1995

5023

AB-872-DEF-732-2Z1

Nov 6 1995

5023

AX-532-FED-452-2Z7

Dec 1 1996

5023

BS-345-DSE-860-1F2

Dec 12 1996

5023

GH-542-NAD-713-9F9

Feb 15 1997

5023

NF-123-ADS-642-9G3

Mar 18 1997

5023

XS-135-DER-432-8J2

Mar 21 1997

5023

ZA-000-ASD-324-4D1

Jul 27 1994

5023

ZD-123-DFG-752-9G8

Mar 21 1997

5023

ZS-645-CAT-415-1B2

Mar 21 1997

5023

ZZ-999-ZZZ-999-0A0

Mar 21 1997

6380

342157

Dec 13 1994

6380

356921

Feb 17 1995

7066

BA27618

Oct 12 1996

7066

BA52498

Oct 27 1995

7066

BA71224

Aug 5 1996

7067

NB-1.142

Jan 2 1997

7067

NB-3.142

Jun 13 1995

7131

Asoap132

Nov 16 1996

7131

Asoap432

Dec 20 1995

7131

Fsoap867

Sep 8 1996

7896

124152

Aug 14 1996

7896

234518

Feb 14 1997

8042

12-F-9

Jul 13 1996

8042

13-E-7

May 23 1995

8042

13-J-9

Jan 13 1997

8042

55-V-7

Feb 20 1997

8042

91-A-7

Mar 20 1997

8042

91-V-7

Mar 20 1997