Database Reference
In-Depth Information
INVOICE
Column Name
Type
Key
Required
Remarks
InvoiceNumber
Number
Primary Key
Yes
Long Integer
CustomerNumber
Number
Foreign Key
Yes
Long Integer
Figure 2-36
Column
Characteristics
for the MDC
Database
INVOICE Table
DateIn
Date
No
Yes
DateOut
Date
No
No
TotalAmount
Currency
No
No
Two Decimal Places
INVOICE_ITEM
Column Name
Type
Key
Required
Remarks
InvoiceNumber
Number
Primary Key,
Foreign Key
Yes
Long Integer
ItemNumber
Number
Primary Key
Yes
Long Integer
Item
Text (50)
No
Yes
Quantity
Number
No
Yes
Long Integer
Two Decimal Places
UnitPrice
Currency
No
Yes
Figure 2-37
Column Characteristics
for the MDC Database
INVOICE_ITEM Table
C. List the LastName, FirstName, and Phone for all customers with a FirstName of 'Nikki'.
D. List the LastName, FirstName, Phone, DateIn, and DateOut of all orders in excess of
$100.00.
e. List the LastName, FirstName, and Phone of all customers whose first name starts with 'B'.
F. List the LastName, FirstName, and Phone of all customers whose last name includes
the characters 'cat'.
Figure 2-38
Sample Data for the MDC
Database CUSTOMER Table
CustomerID
FirstName
LastName
Phone
Email
1
Nikki
Kaccaton
723-543-1233
Nikki.Kaccaton@somewhere.com
2
Brenda
Catnazaro
723-543-2344
Brenda.Catnazaro@somewhere.com
3
Bruce
LeCat
723-543-3455
Bruce.LeCat@somewhere.com
4
Betsy
Miller
725-654-3211
Betsy.Miller@somewhere.com
725-654-4322
George.Miller@somewhere.com
5
George
Miller
6
Kathy
Miller
723-514-9877
Kathy.Miller@somewhere.com
7
Betsy
Miller
723-514-8766
Betsy.Miller@elsewhere.com
 
Search WWH ::




Custom Search