Computer Science, asked by chanslake353, 3 months ago

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

Answered by kiranminia
33

a) Ite.mno integer(10)

Inamevarchar(15)

Pricedecimal(5,2)

Quantityinteger(3)

b) i. Select price * quantity from item;

ii. Select * from item where price<50;

Explanation:

i hope you understand

mark it as Brain.list

Answered by poona2339
11

Answer:

A data type, in programming, exists as a category that determines which type of value a variable has and what kind of mathematical, relational, or logical operations can be involved in it without generating an error.

Explanation:

(i)  The total amount of each item is,

Itemno integer (10)

Iname varchar (15)

Price decimal  $(5,2)$

Quantity integer (3)

(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;

#SPJ3

Similar questions