2021-09-12 12:35:27 +00:00
|
|
|
-- Tags: no-replicated-database
|
|
|
|
-- Tag no-replicated-database: Does not support renaming of multiple tables in single query
|
2018-05-31 17:06:07 +00:00
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
DROP TABLE IF EXISTS test1_00634;
|
|
|
|
DROP TABLE IF EXISTS test2_00634;
|
2018-05-31 17:06:07 +00:00
|
|
|
DROP TABLE IF EXISTS v_test1;
|
|
|
|
DROP TABLE IF EXISTS v_test2;
|
|
|
|
DROP TABLE IF EXISTS v_test11;
|
|
|
|
DROP TABLE IF EXISTS v_test22;
|
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
create table test1_00634 (id UInt8) engine = TinyLog;
|
|
|
|
create table test2_00634 (id UInt8) engine = TinyLog;
|
2018-05-31 17:06:07 +00:00
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
create view v_test1 as select id from test1_00634;
|
|
|
|
create view v_test2 as select id from test2_00634;
|
2018-05-31 17:06:07 +00:00
|
|
|
|
|
|
|
rename table v_test1 to v_test11, v_test2 to v_test22;
|
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
SELECT name, engine FROM system.tables WHERE name IN ('v_test1', 'v_test2', 'v_test11', 'v_test22') AND database = currentDatabase() ORDER BY name;
|
2018-05-31 17:06:07 +00:00
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
DROP TABLE test1_00634;
|
|
|
|
DROP TABLE test2_00634;
|
2018-05-31 17:06:07 +00:00
|
|
|
DROP TABLE v_test11;
|
|
|
|
DROP TABLE v_test22;
|