sales

Transact-SQL Reference

Transact-SQL Reference

sales

Column_name Data type Nullable Key/index
stor_id char(4) no Composite PK, clust. 1, FK stores(stor_id)
ord_num varchar(20) no Composite PK, clust. 1
ord_date datetime no
qty smallint no
payterms varchar(12) no
title_id tid no Composite PK, clust. 1, FK titles(title_id)

1  The composite, primary key, clustered index is defined on stor_id, ord_num, and title_id.

This table shows the contents of the sales table.

stor_id ord_num ord_date qty payterms title_id
6380 6871 Sep 14 1994 12:00AM 5 Net 60 BU1032
6380 722a Sep 13 1994 12:00AM 3 Net 60 PS2091
7066 A2976 May 24 1993 12:00AM 50 Net 30 PC8888
7066 QA7442.3 Sep 13 1994 12:00AM 75 ON invoice PS2091
7067 D4482 Sep 14 1994 12:00AM 10 Net 60 PS2091
7067 P2121 Jun 15 1992 12:00AM 40 Net 30 TC3218
7067 P2121 Jun 15 1992 12:00AM 20 Net 30 TC4203
7067 P2121 Jun 15 1992 12:00AM 20 Net 30 TC7777
7131 N914008 Sep 14 1994 12:00AM 20 Net 30 PS2091
7131 N914014 Sep 14 1994 12:00AM 25 Net 30 MC3021
7131 P3087a May 29 1993 12:00AM 20 Net 60 PS1372
7131 P3087a May 29 1993 12:00AM 25 Net 60 PS2106
7131 P3087a May 29 1993 12:00AM 15 Net 60 PS3333
7131 P3087a May 29 1993 12:00AM 25 Net 60 PS7777
7896 QQ2299 Oct 28 1993 12:00AM 15 Net 60 BU7832
7896 TQ456 Dec 12 1993 12:00AM 10 Net 60 MC2222
7896 X999 Feb 21 1993 12:00AM 35 ON invoice BU2075
8042 423LL922 Sep 14 1994 12:00AM 15 ON invoice MC3021
8042 423LL930 Sep 14 1994 12:00AM 10 ON invoice BU1032
8042 P723 Mar 11 1993 12:00AM 25 Net 30 BU1111
8042 QA879.1 May 22 1993 12:00AM 30 Net 30 PC1035