Issue
Ok so I'm using SQL in phpmyadmin trying to calculate the difference from 2 columns and add that value to a 3rd column. I've imported my data by CSV into the database. I'm trying to "autosum" like excel and Access in SQL database.
My columns are "Tax Collected" - "Tax Paid" = "Tax Gain"
Solution
That we could proper answer, you should best provide e. g. the table create statement, I assume here that you already defined/added a 3rd column of proper data type and default NULL.
This can IMHO be done with standard SQL command like e. g.
UPDATE
YourTableName
SET
TaxGain = TaxCollected - TaxPaid
WHERE
TaxGain IS NULL
Answered By - BitLauncher
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.