07-04-2011, 08:18 PM
cs403 5TH ASSIGNMENT SOLUTION
1. Create a view to show all the supplier names along with their Supplier IDs
Answer:
SELECT [supplier-name],[supplier-ID] FROM supplier
2. Create a view to show the supplier name and supplier ID, who provide the product “Mirrors”.
Answer:
SELECT [supplier-name],[supplier-ID] FROM product, category, supplier
WHERE supplier.[supplier-ID] = category.[supplier-ID] and
category.[category-ID] = product.[category.ID] and
product. product-name = “Mirrors”
3. Create a view to list down all the product names with their category names
Answer:
SELECT [product-name],[category-name] FROM product, category
WHERE product.[category-ID] = category.[category-ID]
4. Update view to change the Supplier name from “AB Hardwares” to “Uplink Hardwares”.
Answer:
UPDATE supplier SET supplier-name = “Uplink Hardwares”
WHERE supplier-name = “AB Hardwares”
1. Create a view to show all the supplier names along with their Supplier IDs
Answer:
SELECT [supplier-name],[supplier-ID] FROM supplier
2. Create a view to show the supplier name and supplier ID, who provide the product “Mirrors”.
Answer:
SELECT [supplier-name],[supplier-ID] FROM product, category, supplier
WHERE supplier.[supplier-ID] = category.[supplier-ID] and
category.[category-ID] = product.[category.ID] and
product. product-name = “Mirrors”
3. Create a view to list down all the product names with their category names
Answer:
SELECT [product-name],[category-name] FROM product, category
WHERE product.[category-ID] = category.[category-ID]
4. Update view to change the Supplier name from “AB Hardwares” to “Uplink Hardwares”.
Answer:
UPDATE supplier SET supplier-name = “Uplink Hardwares”
WHERE supplier-name = “AB Hardwares”
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
