衍生列分为两种类型:stored和virtual。stored即实际存储数据的,而virtual是不存储列上的数据的。
但是两种都可以创建索引。默认是 virtual。
虚拟列:
alter table t_people add phone VARCHAR(20) generated always as (PROFILE->'$.phone') virtual;
或者:alter table t_people add phone VARCHAR(20) generated always as (PROFILE->'$.phone') ;
储蓄列:
alter table t_people add phone VARCHAR(20) generated always as (PROFILE->'$.phone') stored;
参考:https://www.cnblogs.com/ooo0/p/9309277.html
https://blog.csdn.net/Code_shadow/article/details/100055002
https://blog.csdn.net/bugs4j/article/details/79932538