MySQL Forums
Forum List  »  Microsoft SQL Server

Re: Solution for Migrating @Tbl Table Variables
Posted by: Jay Pipes
Date: September 08, 2008 01:58PM

Temporary tables are created on the session level and are not available to other sessions. There is no such correlary to MSSQL's global temporary tables in MySQL. Per the manual:

"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.)"

As noted in a post above, temporary tables can be of any storage engine, so to "pin one in memory", do CREATE TEMPORARY TABLE (...) ENGINE=MEMORY;

Do be aware, however, that the MEMORY storage engine does not support variable-width character, TEXT, or BLOB columns.

Cheers,

Jay

Jay Pipes
Community Relations Manager, North America, MySQL Inc.

Got Cluster? http://www.mysql.com/cluster
Personal: http://jpipes.com

Options: ReplyQuote


Subject
Written By
Posted
Re: Solution for Migrating @Tbl Table Variables
September 08, 2008 01:58PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.