Files
oceanbase/unittest/sql/resolver/sql/test_resolver_tablegroup.test
oceanbase-admin cea7de1475 init push
2021-05-31 22:56:52 +08:00

22 lines
599 B
Plaintext

drop database if exists tablegroup_db;
create database tablegroup_db;
use tablegroup_db;
create table t1(c1 int primary key, c2 int);
create table t2(c1 int primary key, c2 int, c3 varchar(32));
create table t3(c1 int primary key, c2 int, c3 varchar(32));
create tablegroup tg1;
create tablegroup tg2;
create tablegroup if not exists tg1;
alter tablegroup tg1 add table t1;
alter tablegroup tg1 add table t2,t3;
alter table t1 tablegroup = 'tg1';
alter table t2 tablegroup = 'tg2';
alter table t2 drop tablegroup;
drop tablegroup tg2;
drop tablegroup if exists tg2;
drop database tablegroup_db;