github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/table/temporary_table/simple_test.sql (about)

     1  -- @skip:issue#7889
     2  drop database if exists test_temporary;
     3  create database test_temporary;
     4  use test_temporary;
     5  create temporary table t (a int);
     6  create table t1 (a int);
     7  -- test Temporary tables are not displayed when show table
     8  show tables;
     9  insert into t values (1), (2), (3);
    10  select * from t;
    11  delete from t where a = 1;
    12  select * from t;
    13  update t set a = 4 where a = 3;
    14  select * from t;
    15  insert into t1 values (100);
    16  insert into t select * from t1;
    17  select * from t;
    18  drop database if exists test_temporary2;
    19  create database test_temporary2;
    20  use test_temporary2;
    21  create temporary table t (a int);
    22  create table t1 (a int);
    23  select * from t;
    24  drop table t;
    25  select * from test_temporary.t;
    26  drop database if exists test_temporary;
    27  drop database if exists test_temporary2;
    28  drop database if exists test_tmp;
    29  create database test_tmp;
    30  use test_tmp;
    31  drop table if exists f1;
    32  drop table if exists t1;
    33  create table f1 (a int primary key);
    34  create temporary table  t1 (a int primary key);
    35  create temporary table c1(a int, constraint ck foreign key(a) REFERENCES f1(a));
    36  create table c1(a int, constraint ck foreign key(a) REFERENCES t1(a));
    37  drop table if exists f1;
    38  drop table if exists t1;
    39  drop database if exists test_tmp;