Re: Generated Columns AVG of other columns
Posted by: James Butler
Date: August 11, 2020 04:34PM

Thank you, Peter Brawley.

I was mislead by the success of SQRT in the same situation.

For example, this works as expected:

mysql> create table scores (
-> id int,
-> c1 float(4) default 0.1,
-> c2 float(4) default 0.3,
-> c3 float(4) default 0.5,
-> score float(4) generated always as (sqrt(c1+c2+c3))
-> );

I appreciate your response.

Options: ReplyQuote


Subject
Written By
Posted
Re: Generated Columns AVG of other columns
August 11, 2020 04:34PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.