← Back to team overview

drizzle-discuss team mailing list archive

Re: CREATE TABLE LIKE

 

On Tue, Nov 17, 2009 at 4:01 PM, Brian Aker <brian@xxxxxxxxxxx> wrote:
> Hi!
>
> In this case:
>
> CREATE TEMPORARY TABLE t1 (
>  id INT NOT NULL
> , padding VARCHAR(200) NOT NULL
> );
>
> CREATE TABLE t2 LIKE t1;
>
> Should t2 be a TEMPORARY table or not?  What if the engine for t1 can't be
> TEMPORARY? Toss an error?
>
> It seems like to me that either we should toss and error, or t2 should be
> identical to t1.
>
> Thoughts? Opinions?

++

Note that CREATE TABLE LIKE does not support foreign keys.

-- 
- Sheeri K. Cabral

http://tinyurl.com/mysqlbook will take you to the Amazon.com page for
my book, "MySQL Administrator's Bible".



References