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.