Which code segment should you use to create the table?

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?

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



Leave a Reply 5

Your email address will not be published. Required fields are marked *


CB

CB

D) DECLARE @oneTable TABLE

dp

dp

C.
CREATE TABLE #oneTable

because “Only usp1 will be allowed to access the table.”
See
http://www.sqlteam.com/article/temporary-tables

dp

dp

Sry, its D.. bcause “The solution must minimize the need to recompile the stored procedure.”

Panos

Panos

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

krishtweety

krishtweety

B is the correct