-- 创建表
CREATE TABLE a (a UInt8) ENGINE=Memory;
CREATE TABLE b (b UInt8) ENGINE=Memory;
CREATE TABLE c (c UInt8) ENGINE=Memory;
CREATE TABLE d (d UInt8) ENGINE=Memory;
-- 在单个查询中交换两对表
EXCHANGE TABLES a AND b, c AND d;
SHOW TABLE a;
SHOW TABLE b;
SHOW TABLE c;
SHOW TABLE d;