List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:March 28 2006 2:22pm
Subject:Re: CREATE TABLE x AS with ENGINE = ARCHIVE
View as plain text  
Terry

>I require something along the lines of this:

>CREATE TABLE old AS SELECT * FROM request_log ENGINE=ARCHIVE

CREATE TABLE tblname ENGINE=archive SELECT * FROM request_log;

PB

-----

Terry Burton wrote:
> Hi,
>
> I'm using MySQL 4.11. Is it possible to use the CREATE TABLE x AS
> syntax alongside the ENGINE = x pragma, since this would make
> archiving of tables very simple.
>
> I require something along the lines of this:
>
> CREATE TABLE old AS SELECT * FROM request_log ENGINE=ARCHIVE
>
> If this cannot be done then I can always get equivalent functionality
> by performing CREATE TABLE x (...) ENGINE=x followed by INSERT INTO x
> SELECT * FROM x, however this is not so neat since it require
> knowledge of the source table structure which makes it less ideal for
> automation.
>
>
> Many thanks,
>
> Tez
>
>   


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.2/293 - Release Date: 3/26/2006

Thread
CREATE TABLE x AS with ENGINE = ARCHIVETerry Burton28 Mar
  • Re: CREATE TABLE x AS with ENGINE = ARCHIVEPure Web Solution28 Mar
    • Re: CREATE TABLE x AS with ENGINE = ARCHIVETerry Burton28 Mar
  • Re: CREATE TABLE x AS with ENGINE = ARCHIVEPeter Brawley28 Mar
    • Re: CREATE TABLE x AS with ENGINE = ARCHIVETerry Burton28 Mar