Display all of the information in the customer table for customers in California
ID: 3593782 • Letter: D
Question
Display all of the information in the customer table for customers in California (use CA) with a zero balance
SalesRep PK RepID Customer varchar(20) varchar(20) PK CustomerID int LastName FirstName CommissionRate decimal(10,2) LastName varchar(20) FirstName varchar(20) Street varchar(20) varchar(20) char(2) char(5) decimal(10,2) Order PK | OrderID | int Balance FK1 RepID FK1 CustomerlD int OrderDate date ShipDate date Part PK PartID Description varchar(20) UnitsOnHand int ItemClass PK,FK1 OrderlDint PK,FK2 PartIDint char(4) decimal(10,2) decimal(10,2) QuantityintExplanation / Answer
We can rretrieve the information in the customer table for customers in California (use CA) with a zero balance by using following query:
SELECT * FROM customer WHERE state='CA' AND balance=0;