You are creating a stored procedure named usp1. Usp1 will create a table that will be used
during the execution of usp1. Only usp1 will be allowed to access the table.
You need to write the code required to create the table for usp1. The solution must minimize
the need to recompile the stored procedure.
Which code segment should you use to create the table?
A.
CREATE TABLE oneTable
B.
CREATE TAB1E ##oneTable
C.
CREATE TABLE #oneTable
D.
DECLARE goneTable TABLE
D) DECLARE @oneTable TABLE
C.
CREATE TABLE #oneTable
because “Only usp1 will be allowed to access the table.”
See
– http://www.sqlteam.com/article/temporary-tables
Sry, its D.. bcause “The solution must minimize the need to recompile the stored procedure.”
I would go with D if there was a “@” in front of the table variable.
As there is not one, in this case I will go with C
B is the correct