Page 1 of 1

Dynamic tables in Mysql

Posted: Thu Nov 24, 2005 9:15 am
by someberry
Hi all

I want to create a table in mysql but the content of it being information based on other tables in the database. I'm sure this is possible, but dont know how or what you call it to look up a tutorial.

Any one know what is called and point me to a web site on it?

So this table wouldn't be for editing it may contain couts, sums etc of other tables.

I know you just do all this php etc, just asking if this possible.

Thanks

Posted: Thu Nov 24, 2005 9:20 am
by n00b Saibot
its called temporary table...

Code: Select all

CREATE TEMPORARY TABLE `xxx` ( ... )

Posted: Thu Nov 24, 2005 9:28 am
by Skittlewidth
http://dev.mysql.com/doc/refman/4.1/en/ ... table.html

That link is a bit of information overload but basically you'll probably want something like:

Code: Select all

CREATE TEMPORARY TABLE
    temp_tablename
SELECT
  ....
 FROM
   ....
   ....
 [i]and all your other select and join options [/i]

simular problem

Posted: Thu Nov 24, 2005 11:19 am
by Paul Richards
Does any one know how to do a table that updates automatically as other tables change in the database?