ClickHouse/tests/queries/0_stateless/01470_test_insert_select_asterisk.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
847 B
MySQL
Raw Normal View History

2020-09-03 17:51:16 +00:00
DROP TABLE IF EXISTS insert_select_dst;
DROP TABLE IF EXISTS insert_select_src;
CREATE TABLE insert_select_dst (i int, middle_a int, middle_b int, j int) ENGINE = Log;
CREATE TABLE insert_select_src (i int, j int) ENGINE = Log;
INSERT INTO insert_select_src VALUES (1, 2), (3, 4);
INSERT INTO insert_select_dst(* EXCEPT (middle_a, middle_b)) SELECT * FROM insert_select_src;
INSERT INTO insert_select_dst(insert_select_dst.* EXCEPT (middle_a, middle_b)) SELECT * FROM insert_select_src;
INSERT INTO insert_select_dst(COLUMNS('.*') EXCEPT (middle_a, middle_b)) SELECT * FROM insert_select_src;
INSERT INTO insert_select_dst(insert_select_src.* EXCEPT (middle_a, middle_b)) SELECT * FROM insert_select_src; -- { serverError 47 }
SELECT * FROM insert_select_dst;
DROP TABLE IF EXISTS insert_select_dst;
DROP TABLE IF EXISTS insert_select_src;