CREATE TABLE LIKE

    CreateTableLikeStmt

    CREATE TABLE LIKE - 图2

    LikeTableWithOrWithoutParen

    OnCommitOpt

    1. CREATE TABLE t1 (a INT NOT NULL);
    1. Query OK, 0 rows affected (0.13 sec)
    1. Query OK, 5 rows affected (0.02 sec)
      1. CREATE TABLE t2 LIKE t1;
      1. Query OK, 0 rows affected (0.10 sec)

      语句与 MySQL 完全兼容。如发现任何兼容性差异,请在 GitHub 上提交 issue