Build MySQL table with a query

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeremy Ross

    Build MySQL table with a query

    Hello,

    I am looking for a function that will build a mysql table with the
    results of a query.

    If you could help that would be great,
    Thanks,
    Jeremy Ross
  • Brommer

    #2
    Re: Build MySQL table with a query

    Jeremy Ross wrote:[color=blue]
    > Hello,
    >
    > I am looking for a function that will build a mysql table with the
    > results of a query.[/color]

    Not sure if this is what you need, but you can do it directly in SQL:

    CREATE TABLE newtable AS
    SELECT * FROM oldtable;

    Comment

    • Jeremy Ross

      #3
      Re: Build MySQL table with a query

      Thank you that was just what I needed.

      Brommer wrote:
      [color=blue]
      > Jeremy Ross wrote:
      >[color=green]
      >> Hello,
      >>
      >> I am looking for a function that will build a mysql table with the
      >> results of a query.[/color]
      >
      >
      > Not sure if this is what you need, but you can do it directly in SQL:
      >
      > CREATE TABLE newtable AS
      > SELECT * FROM oldtable;[/color]

      Comment

      Working...