drop table if exists t_aux, t2 ; create table t_aux ( a int ) ; insert into t_aux values(1) ; select a from t_aux; a 1 create table t2 ( a int ) ; insert into t2 select a from t_aux; select a from t2; a 1 drop table t2 ; create table t2 ( a int ) ; insert into t2 select 1 from t_aux; select a from t2; a 1 drop table t2 ; create table t2 ( a int ) ; insert into t2 select 1 ; select a from t2; a 1 drop table t2 ; create table t2 ( a int ) select a from t_aux ; select a from t2; a 1 drop table t2 ; create table t2 ( a int ) select 1 from t_aux; select a from t2; a NULL drop table t2 ; create table t2 ( a int ) select 1 ; select a from t2; a NULL drop table t2 ; create table t2 ( a int ) select CAST(1 AS signed INTEGER) from t_aux; select a from t2; a NULL drop table t2 ; create table t2 ( a int, b int ) select a, 1 from t_aux; select a,b from t2; a b 1 NULL drop table t2 ; select 1, a from t_aux; 1 a 1 1 create table t2 ( a int, b int ) select 1, a from t_aux; select a,b from t2; a b 1 NULL drop table t2 ; create table t2 ( a int ) select 1 as a ; select a from t2; a 1 drop table t2 ; drop table t_aux ;