Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

https://learn.microsoft.

com/en-us/answers/questions/458111/writing-stored-
procedure?page=1 other................
//1.
Having a local temporary table created inside a stored procedure scope with

the following content:


CREATE TABLE #temp

UserId int,
FirstName nvarchar (100),
LastName nvarchar (100),
IsApproved bit,
IaDeleted bit,
CompanyId int,
CompanyName nvarchar (256),
CompanyStreet nvarchar (64),
CompanyZip nvarchar (16),
CompanyCity nvarchar (64),

What SQL Command should be used to create a non-clustered index based on


UserId, CompanyId

One answer accepted.

A) Non-clustered indexes are not possible to be created on temporary tables


B) Indexes ar not possible to be created on temparary tables
C) CREATE NONCLUSTERED INDEX index_nane ON #temp (UserId.CompanyId);X
D)CREATE PRIMARY INDEX Ix_templndexUsrPrg ON #temp AS (UserId.CompanyId);
*****************************************************************************

You might also like