Re: CREATE TABLE x AS with ENGINE = ARCHIVE
On 3/28/06, Peter Brawley <[EMAIL PROTECTED]> wrote: > >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 Excellent. Exactly what I need. Thanks :-) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: CREATE TABLE x AS with ENGINE = ARCHIVE
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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: CREATE TABLE x AS with ENGINE = ARCHIVE
On 3/28/06, Pure Web Solution <[EMAIL PROTECTED]> wrote: > I dont think that it is possible to specify the engine when creating a table > this way, you could however create the table using the: > > CREATE TABLE old AS SELECT * FROM request_log > > and then issue an alter table command setting the engine to whatever you like. Thanks Paul, That solution seems a little wasteful in terms of resources though. If there is no nice way to achieve this operation then do people think that it would be a good idea to push for the inclusion of this functionality. If more folks than myself can see the benefit in this then please speak up, in which can I'll cross post this to the development list to see what the devs make of it. Warm regards, Tez -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: CREATE TABLE x AS with ENGINE = ARCHIVE
I dont think that it is possible to specify the engine when creating a table this way, you could however create the table using the: CREATE TABLE old AS SELECT * FROM request_log and then issue an alter table command setting the engine to whatever you like. Pure Web Solution http://www.purewebsolution.co.uk PHP, MYSQL, Web Design & Web Services "Terry Burton" <[EMAIL PROTECTED]> 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 > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > Pure Web Solution http://www.purewebsolution.co.uk PHP, MYSQL, Web Design & Web Services -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
CREATE TABLE x AS with ENGINE = ARCHIVE
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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]