Database Reference
In-Depth Information
EXAMPLE 4
List the name of every customer with a $10,000 credit limit.
108
SELECT CustomerName
FROM Customer
WHERE CreditLimit=10000
;
EXAMPLE 5
Find the name of customer 148.
SELECT CustomerName
FROM Customer
WHERE CustomerNum=
'
148
'
;
EXAMPLE 6
Find the customer name for every customer located in the city of Grove.
SELECT CustomerName
FROM Customer
WHERE City=
'
Grove
'
;
EXAMPLE 7
List the number, name, credit limit, and balance for all customers with credit limits that exceed their
balances.
SELECT CustomerNum, CustomerName, CreditLimit, Balance
FROM Customer
WHERE CreditLimit
>
Balance
;
EXAMPLE 8
List the descriptions of all parts that are located in warehouse 3 and for which there are more than 20 units
on hand.
SELECT Description
FROM Part
WHERE Warehouse=
'
3
'
AND OnHand
>
20
;