(ii)Display the name and price of products that belong to the category Electronics or Furniture.
Answer by student
SELECT PName, Price FROM PRODUCT WHERE Category = ‘Electronics’ OR Category = ‘Furniture’;
Detailed answer by teachoo
To display the name and price of products that belong to the category Electronics or Furniture, we need to use the SELECT statement in SQL . In this case, we want to select the PName and Price columns from the PRODUCT table . We also need to specify the condition that the Category column of the PRODUCT table is either Electronics or Furniture. We use the WHERE clause to specify the condition. We also use the OR operator to combine two conditions. So, we write:
SELECT PName, Price FROM PRODUCT WHERE Category = 'Electronics' OR Category = 'Furniture';