*: Support the statement of "create table ... like" (#2707)

This commit is contained in:
Lynn
2017-02-22 23:57:04 +08:00
committed by Ewan Chou
parent f7c95f3f42
commit 61868f44dc
9 changed files with 130 additions and 3 deletions

View File

@ -1610,6 +1610,14 @@ CreateTableStmt:
Options: $8.([]*ast.TableOption),
}
}
| "CREATE" "TABLE" IfNotExists TableName "LIKE" TableName
{
$$ = &ast.CreateTableStmt{
Table: $4.(*ast.TableName),
ReferTable: $6.(*ast.TableName),
IfNotExists: $3.(bool),
}
}
DefaultKwdOpt:
{}