List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 19 1999 9:45pm
Subject:Re: Using SQL to create new table based on select results
View as plain text  
>There's another way that should work in 3.23 according to the manual:
>CREATE TABLE foo SELECT bar,..
>which would automaticly create the cols from the select statement in the
>new table.
>Unfortunately it doesnt work :P I get a "permission denied" error when i
>try that, but i can create a table as the same user if i skip the select
>part...
>
>Sorry if this info was worthless, but maybe someone with 3.23 can help me
>out :P

Hmm, I just tried it and was able to do it.  Maybe this is similar to
the problem of SHOW TABLES no longer working unless you're the root user.
Do you have MySQL root user privileges, and if so, can you try the same
thing in mysql while connected as that user?

--
Paul DuBois, paul@stripped
Thread
Using SQL to create new table based on select resultsWilliam D. Webber20 Jul
  • Re: Using SQL to create new table based on select resultsBenjamin Pflugmann20 Jul
  • Re: Using SQL to create new table based on select resultsPaul DuBois20 Jul
  • Re: Using SQL to create new table based on select resultsSasha Pachev20 Jul
    • Re: Using SQL to create new table based on select resultsJohan Isacsson20 Jul
      • Re: Using SQL to create new table based on select resultsPaul DuBois20 Jul
        • Re: Using SQL to create new table based on select resultsJohan Isacsson20 Jul
    • Re: Using SQL to create new table based on select resultsSasha Pachev20 Jul
    • Re: Using SQL to create new table based on select resultssinisa20 Jul
Re: Using SQL to create new table based on select resultsKevin Smith20 Jul
Re: Using SQL to create new table based on select resultssinisa20 Jul
Re: Using SQL to create new table based on select resultsMichael Widenius2 Aug