I have a mysql table with 2 fields: numPears
(int) and numApples
(int) and i'd like to have a numFruit
(int) that automatically get these 2 values and sum them. Is that possible?
Example
So that if a query
INSERT INTO strange_table (fruitID, numPears, numApples) VALUES (1, 1, 5);
And then query
SELECT numFruit FROM strange_table WHERE fruitID = 1;
It returns me 6
.