On-demand training: More Gems from the SQL Prompt Treasure Chest. Watch now.

Temp Table Suggestions SQL Prompt

Hi, when using SQL Prompt I'm finding that when I SELECT INTO a temp table I get suggestions perfectly, although when I create the temp table and INSERT INTO there are no suggestions whatsoever.

Do I have something set-up incorrectly or is this expected behavior?

--- Selecting into a temp table
IF OBJECT_ID('tempdb..#Thisworks') Is Not Null Begin Drop Table #Thisworks END
SELECT 123456 AS Res, 1 AS Ver
INTO #Thisworks

--- Creating and inserting into a temp table
IF OBJECT_ID('tempdb..#Thisdoesnt') Is Not Null Begin Drop Table #Thisdoesnt END
CREATE TABLE #Thisdoesnt
( [Res] [int] NOT NULL,
[Ver] [int] NOT NULL
) WITH (DATA_COMPRESSION = PAGE)

INSERT INTO #Thisdoesnt ([Res], [Ver])
SELECT 123456, 1
Tagged:

Answers

Sign In or Register to comment.