2021-09-12 12:35:27 +00:00
|
|
|
-- Tags: no-parallel
|
|
|
|
|
2020-02-11 18:05:08 +00:00
|
|
|
CREATE DATABASE test_00740;
|
|
|
|
USE test_00740;
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS test_00740;
|
|
|
|
DROP TABLE IF EXISTS test_view_00740;
|
|
|
|
DROP TABLE IF EXISTS test_nested_view_00740;
|
|
|
|
DROP TABLE IF EXISTS test_joined_view_00740;
|
2018-10-17 06:35:16 +00:00
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
CREATE VIEW test_00740 AS SELECT 1 AS N;
|
|
|
|
CREATE VIEW test_view_00740 AS SELECT * FROM test_00740;
|
|
|
|
CREATE VIEW test_nested_view_00740 AS SELECT * FROM (SELECT * FROM test_00740);
|
|
|
|
CREATE VIEW test_joined_view_00740 AS SELECT *, N AS x FROM test_00740 ANY LEFT JOIN test_00740 USING N;
|
2018-10-17 06:35:16 +00:00
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
SELECT * FROM test_view_00740;
|
|
|
|
SELECT * FROM test_nested_view_00740;
|
|
|
|
SELECT * FROM test_joined_view_00740;
|
2018-10-17 06:35:16 +00:00
|
|
|
|
|
|
|
USE default;
|
2020-02-11 18:05:08 +00:00
|
|
|
SELECT * FROM test_00740.test_view_00740;
|
|
|
|
SELECT * FROM test_00740.test_nested_view_00740;
|
|
|
|
SELECT * FROM test_00740.test_joined_view_00740;
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS test_00740.test_00740;
|
|
|
|
DROP TABLE IF EXISTS test_00740.test_view_00740;
|
|
|
|
DROP TABLE IF EXISTS test_00740.test_nested_view_00740;
|
2018-10-17 06:35:16 +00:00
|
|
|
|
2020-02-11 18:05:08 +00:00
|
|
|
DROP DATABASE test_00740;
|