Is it possible in mysql to create a table with a column that combines two column values? something like this:
create table test1 (
number1 int,
number2 int,
total int DEFAULT (number1+number2)
);
or like this :
CREATE TABLE `Result` (
`aCount` INT DEFAULT 0,
`bCount` INT DEFAULT 0,
`cCount` = `aCount` + `bCount`
);
It is not possible to do that exactly, but you can create a view based on a query that combines them:
I would avoid actually storing the combined data in a table, unless you’re going to be running lots of queries that will reference the combined data in their WHERE clauses.