| Bug #34932 | CREATE TABLE xyz like zyx | ||
|---|---|---|---|
| Submitted: | 28 Feb 2008 15:22 | Modified: | 7 Mar 2008 16:55 |
| Reporter: | Frank Mussmann | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: DDL | Severity: | S4 (Feature request) |
| Version: | 5.0, 5.1, 6.0 | OS: | Linux |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | create, foreign key, like, table | ||
[28 Feb 2008 15:22]
Frank Mussmann
[7 Mar 2008 16:55]
Susanne Ebrecht
Many thanks for writing a feature request.
I think to support this is a good idea.
Something like:
CREATE TABLE tab LIKE parent_table [ { INCLUDING | EXCLUDING } { DEFAULTS | CONSTRAINTS } ]
would make sense.
[15 Feb 2009 18:33]
Peter Gulutzan
For WL#148 "Foreign Keys (all storage engines)" the decision was: " CREATE TABLE ... LIKE --------------------- "CREATE TABLE t1 LIKE t2" does not copy t2's foreign keys, so no special code is needed for this. "
