github.com/dolthub/go-mysql-server@v0.18.0/enginetest/scriptgen/setup/scripts/generated_column_tables (about) 1 exec 2 create table generated_stored_1 (a int primary key, b int as (a + 1) stored) 3 ---- 4 5 exec 6 create index i1 on generated_stored_1(b) 7 ---- 8 9 exec 10 insert into generated_stored_1 (a) values (1), (2) 11 ---- 12 13 exec 14 create table generated_stored_2 ( 15 a int primary key, 16 b int as (a + 1) stored, 17 c int 18 ) 19 ---- 20 21 exec 22 insert into generated_stored_2 (a,c) values (1,3) 23 ---- 24 25 exec 26 create index i2 on generated_stored_2(b,c) 27 ---- 28 29 exec 30 create table generated_virtual_1 ( 31 a int primary key, 32 b int, 33 c int generated always as (a + b) virtual, 34 index idx_c (c) 35 ) 36 ---- 37 38 exec 39 insert into generated_virtual_1 (a, b) values (1, 2), (3, 4) 40 ---- 41 42 exec 43 create table generated_virtual_keyless ( 44 j json, 45 v int generated always as (j->>'$.a') virtual, 46 index idx_v (v) 47 ) 48 ---- 49 50 exec 51 insert into generated_virtual_keyless(j) values ('{"a": 1}'), ('{"a": 2}'), ('{"b": 3}') 52 ---- 53