temp table in mysql query

Posts   
 
    
nirav
User
Posts: 8
Joined: 28-Jan-2005
# Posted on: 01-Feb-2005 18:55:39   

Is there any way to create a temp table through the code? I have a mysql query (no stored procedures) that i would like to execute. Here is the T-SQL version:


CREATE TABLE #NetworkUniverse (
    UserId INT,
    MemberId INT
)

INSERT INTO #NetworkUniverse ( UserId, MemberId )
SELECT UserId, MemberId 
FROM Network
WHERE UserId IN ( SELECT MemberId FROM Network WHERE UserId = @UserId )

SELECT * 
FROM #NetworkUniverse A 
    INNER JOIN [Profile] ON A.UserId = [Profile].UserId
WHERE MemberId = @MemberId

Any help would be appreciated.