Shared Flashcard Set

Details

SQL
SQL Test
6
Computer Science
Undergraduate 2
12/08/2010

Additional Computer Science Flashcards

 


 

Cards

Term
List all of the animals that are dogs with brown in their color that were born after Jan 15, 2010
Definition
SELECT Animal.Name, Animal.Category, Animal.DateBorn, Animal.Color
FROM Animal
WHERE (Animal.Category="dog")and Animal.DateBorn>#1/15/2010#)and (Animal.Color like "*Brown*"));
Term
List the sale price of all cats in descending order.
Definition
Select Animal.Name, Animal.Category, SaleAnimal.SalePrice
FROM Animal Inner Join SaleAnimal on Animal.AnimalID=Animal.AnimalID
WHERE (Animal.Category="Cat"
ORDER BY SaleAnimal.SalePrice DESC;
Term
Change the last name of Employee Margie Thompson to Bowman
Definition
Update Employee
SET Employee.LastName="Bowman"
WHERE Employee.LastName="Thompson" and Employee.FirstName = "Margie"
Term
Insert the following item into the Merchandise table: Cat Tower, QOH is 5, ListPrice is 28.95
Definition
INSERT INTO Merchandise
(ItemID, Description, QuantityOnHand,, ListPrice, Category)
VALUES (999, "Cat Tower", 5, 28.95, "cat");
Term
DROP the breed table
Definition
Drop Table Breed
Term
List all of the merchandise that is not cat or dog merchandise
Definition
SELECT Merchandise.ItemID, Merchandice.Description, Merchandise.Category
Where (Merchandise.Category) NOT IN ("Cat", "Dog"));
Supporting users have an ad free experience!