SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE test_table ( a INT, b INT ) ENGINE = InnoDB; INSERT INTO test_table VALUES (1, 2), (2, 3), (3, 4); ALTER TABLE test_table ADD COLUMN a_b_sum INT AS (a + b); SELECT * FROM test_table; INSERT INTO test_table VALUES (5, 7), (2, 9), (2, 3); ALTER TABLE test_table ALTER COLUMN a_b_sum SET INVISIBLE; INSERT INTO test_table VALUES (5, 7), (2, 9), (2, 3); SELECT a, b, a_b_sum FROM test_table;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear