In SQL, how to multiply data of two columns for third column
I want to multiply the data of two columns and show it in the third column.
For example:
1st Column: Quantity 2nd Column: Rate 3rd Column: Price
I want to multiply as user enters the data for quantity and rate like Quantity=2
, rate=50
automatically in price column I want 100 to be mentioned.
Using C#, VS2010, SQL 2008
Edit: I want to show the data at the DataGridView
what are the possible solutions, I used DataAdapter
and DataSet
to update the开发者_JAVA百科 database:
this.table2TableAdapter.Update(testingDataSet);
SELECT QUANTITY, RATE, QUANTITY*RATE as PRICE
FROM YOUR_TABLE
精彩评论