#Temporary tables, indexes and procedures work!

0

Please login or register to vote for this query.

(click on this box to dismiss)

#Temporary views and functions return errors stating they're not allowed. Use Text-only results, and include the execution plan to see the index has been used.

Internet of Things Meta

Q&A about the site for builders and users of networked sensors and control devices in the contexts of smart homes, industry automation, or environmental sensors

-- #Temporary tables and indexes work
-- Procedures can be created, but I don't know the current syntax.
-- Include execution plan to see index is used.

CREATE TABLE #Test (id int IDENTITY(1,1) NOT NULL, v VARCHAR(MAX) NOT NULL)

CREATE INDEX #IX_T on #Test(id)

INSERT INTO #Test(v) SELECT @@VERSION

INSERT INTO #Test(v) VALUES ('Yay!')

SELECT * FROM #Test Order By id

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results