衍生列分为两种类型: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;