Stored Procedures in 5.0.15

Stored Procedures in 5.0.15

am 03.11.2005 17:36:50 von Melissa Dougherty

------=_NextPart_000_002E_01C5E06A.E1747C70
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Are temp tables available in stored procedures?? If so, how are they =
created (named)?


Melissa
------=_NextPart_000_002E_01C5E06A.E1747C70--

Re: Stored Procedures in 5.0.15

am 03.11.2005 18:07:48 von SGreen

--=_alternative 005E129E852570AE_=
Content-Type: text/plain; charset="US-ASCII"

"Melissa Dougherty" wrote on 11/03/2005 11:36:50
AM:

> Are temp tables available in stored procedures?? If so, how are
> they created (named)?
>
>
> Melissa

I don't remember there being any restriction on creating or using
temporary tables from within a stored procedure. You name them just as you
do any other table.

MySQL does not have its temp tables in the global namespace, each one is
unique (private) to the connection that creates it. If you need a table
that is visible from another connection, it cannot be temporary. The
difference in creating a temporary table and a static table is the use of
the word TEMPORARY in the CREATE TABLE statement.

Please RTFM for more details ...

Naming restrictions:
http://dev.mysql.com/doc/refman/4.1/en/legal-names.html

CREATE TABLE statement:
http://dev.mysql.com/doc/refman/4.1/en/create-table.html

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
--=_alternative 005E129E852570AE_=--