a) The structure of a table “ITEM” is given below. Suggest suitable data type and
size of each column.
Column name Type Size
Itemno ____________ ______
Iname ____________ ______
Price ____________ ______
Quantity ____________ ______
b) Consider the following table “ITEM”:
Table: Item
ItemnoIname Price Quantity
11 Soap 40 80
22 Powder 80 30
33 Face cream 250 25
44 Shampoo 120 100
55 Soap box 20 50
Write queries to
i. Display the total amount of each item. The amount must be calculated as
the price multiplied by quantity for each item.
ii. Display the details of items whose price is less than 50 .
Answers
The structure of a table “ITEM” is given below. Suggest suitable data type and
size of each column.
Column name Type Size
Itemno ____________ ______
Iname ____________ ______
Price ____________ ______
Quantity ____________ ______
b) Consider the following table “ITEM”:
Table: Item
ItemnoIname Price Quantity
11 Soap 40 80
22 Powder 80 30
33 Face cream 250 25
44 Shampoo 120 100
55 Soap box 20 50
Write queries to
i. Display the total amount of each item. The amount must be calculated as
the price multiplied by quantity for each item.
ii. Display the details of items whose price is less than 50 .
Answer:
Given below is the answer
Explanation:
In programming, a data type is a classification that establishes the kind of value a variable can have and the kinds of mathematical, relational, or logical operations that can be performed on it without producing an error.
The total amount of each item is,
Itemno integer
Iname varchar
Price decimal
Quantity integer
(ii) The components of items whose cost exists lower than 50 is,
b) i. Select price ×quantity from item;
ii. Select ×from item where price<50;
A data type is a classification that is used in programming. This classification determines the type of value that a variable can have, as well as the types of mathematical, relational, or logical operations that can be done on the variable without the result being an error.
See more;
https://brainly.in/question/16261816
#SPJ3