mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-20 05:05:38 +00:00
19 lines
221 B
SQL
19 lines
221 B
SQL
DROP TABLE IF EXISTS a;
|
|
DROP TABLE IF EXISTS b;
|
|
|
|
CREATE VIEW a AS
|
|
SELECT 'a' AS id;
|
|
|
|
CREATE VIEW b AS
|
|
SELECT
|
|
'a' AS id,
|
|
'b' as other
|
|
;
|
|
|
|
SELECT *
|
|
FROM b
|
|
WHERE id IN (SELECT id from a);
|
|
|
|
DROP TABLE a;
|
|
DROP TABLE b;
|