tabla virtual

jonathan Patricio Sepulveda Bustamante sft.netlux en gmail.com
Mie Jun 29 16:35:12 CLT 2005


son tablas temporales
 
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] *tbl_name*
    [(*create_definition*,...)]
    [*table_options*] [*select_statement*]

Or: 

CREATE [TEMPORARY] TABLE [IF NOT EXISTS] *tbl_name*
    [(] LIKE *old_tbl_name* [)];

>From MySQL 3.23 on, you can use the TEMPORARY keyword when creating a table. 
A TEMPORARY table is visible only to the current connection, and is dropped 
automatically when the connection is closed. This means that two different 
connections can use the same temporary table name without conflicting with 
each other or with an existing non-TEMPORARY table of the same name. (The 
existing table is hidden until the temporary table is dropped.) From MySQL 
4.0.2 on, you must have the CREATE TEMPORARY TABLES privilege to be able to 
create temporary tables. 

In MySQL 3.23 or later, you can use the keywords IF NOT EXISTS so that an 
error does not occur if the table exists. Note that there is no verification 
that the existing table has a structure identical to that indicated by
the CREATE
TABLE statement. Also, if you use IF NOT EXISTS in a CREATE TABLE ...
SELECTstatement, any records selected by the
SELECT part are inserted regardless of whether the table already exists. 


 On 6/29/05, Esteban Fernández <efernandez en vantageglobal.com> wrote: 
> 
> Tablas temporales ?
> 
> 
> -----Original Message-----
> From: php-bounces en listas.inf.utfsm.cl
> [mailto:php-bounces en listas.inf.utfsm.cl] On Behalf Of Juan Andres Ramirez
> Sent: Miércoles, 29 de Junio de 2005 4:16
> To: Lista php
> Subject: tabla virtual
> 
> Hola lista:
> Queria saber si se puede crear una especie de tabla virtual(digamos
> un estracto de una tabla existente) con ciertos datos, los cuales se 
> supone
> que se modificaran bastante, entonces una vez que se tengan todas las
> modificaciones, agregar estos datos a la BD??, en MYSQL??. El objetivo de
> esto es no recorrer inecesariamente una tabla muy grande, con datos que no
> vamos a ocupar, por cada consulta, y asi que valla mas rapido todo.
> En otras bases de datos se puede, pero no se si en mysql. Gracias!!
> 
> --
> --------------------------------
> Juan Andres Ramirez A.
> Linux Counter: 288133
> mail2:sombra_chile en hotmail.com
> mail3:sombra_cl en chile.com
> irc.cl:#linuxhelp
> nick: sombra
> _
> (o< zzz
> //\
> V_/_user:debian sarge
> --------------------------------
> 
> 
>
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://listas.inf.utfsm.cl/pipermail/php/attachments/20050629/34610f46/attachment.html


Más información sobre la lista de distribución PHP