hey how to answer to these questions
Table: Sales(CustomerID , RepID , Area , SaleDate , ProductNo , Quantity , UnitPrice , ItemTotalPrice)
a)considering the above table write a function to calculate the IemTotalPrice as
ItemTotalPrice=Quantity*UnitPrice
b)Write a SQL statement to create the above table
(you must use the above created function so that it automatically calculate the value for the field ItyemTotalPrice)
so far i only got answer to a) but i dont know its right or wrong
this is my answer
create function calc (@qty int,@up int) return int
as
declare @ItemTotalPrice int
set @ItemTotalPrice=@qty*@up
return @ItemTotalPrice
i dont know how to answer to b) plz help me .