MySQL Forums
Forum List  »  Microsoft SQL Server

Re: Solution for Migrating @Tbl Table Variables
Posted by: Jay Pipes
Date: March 27, 2006 11:41PM

Just use a temporary table in the procedure:

DELIMITER //
CREATE PROCEDURE my_proc () BEGIN

CREATE TEMPORARY TABLE TempTable (myid int, myfield varchar(100));
INSERT INTO TmpTable SELECT tblid, tblfield FROM Table1;

/* Do some more stuff .... */

END//

Cheers,

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
March 27, 2006 11:41PM


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.