Also, sometimes one needs to copy the content of a table in itself but
earlier versions of MySQL don't support something like
INSERT INTO some_table SELECT * FROM some_table /* the select table and
insert tables are not different */
So, you may create a temporary table, fill it with the info you want to
copy, copy the contents of the temporary table into the original table and
distroy the temporary table.
Also, I sometimes work with complex joins. Instead of using those lengthy
SQL instructions, I create temp tables and work with them.
Thanks
Emery
----- Original Message -----
From: "Nitin" <nitinmehta@stripped>
To: "Susan Ator" <SAtor@stripped>; <mysql@stripped>
Sent: Thursday, October 16, 2003 16:39
Subject: Re: Temporary table question
> basically used to make queries easier running from within scripts. it
could
> be a good workaround for views, as you can create a temporary table to be
> used as a view, but it gets destroyed as the connection to your database
> closes. You can also use it as a good workaround for union, for older
mysql
> version, which doesn't support union and for other functions you want to
> perform on some rows selected from multiple tables.
>
> Enjoy
> Nitin
>
> ----- Original Message -----
> From: "Susan Ator" <SAtor@stripped>
> To: <mysql@stripped>
> Sent: Thursday, October 16, 2003 7:39 PM
> Subject: Temporary table question
>
>
> > I would like to know the circumstances in which a temporary table would
be
> > used. What is the rationale behind temporary tables? I have searched the
> > manual and the 'net but only find out information about creating or
> > manipulating them.
> >
> > Thanks,
> >
> > Susan
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> http://lists.mysql.com/mysql?unsub=1
> >
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=1
>
>
>