I m has a table
SALES(sno,comp_name,quantity,costperunit,totalcost)
After submitting the costperunit values, the costperunit totalcost be calculated as "totalcost=quantity*costperunit".
I want to multiply the columns 'quantity' and 'costperunit' and save the result in the column 'totalcost' the same table.
I tried this:
insert into SALES(totalcost) select quantity*costperunit as res from SALES
But it failed!
Someone please help me with this. Thanks at Advance
source share