Sample Header Ad - 728x90

Computed/Generated columns in MySQL 5

3 votes
3 answers
13351 views
How do I create a table with a formula column in MySQL version 5? For example: I have a table named Product, which has 5 columns: id int, amount int, sold_out int, faulty int, remain_amount is (amount-(sold_out+faulty)) I will not use a trigger or a view. I am looking for a solution similar to what, in SQL Server, is called a computed column.
Asked by Amin (31 rep)
Oct 9, 2015, 08:49 PM
Last activity: Nov 19, 2021, 11:40 PM