December 28, 2013 at 7:33 am
What is the difference b/n table variable & temp table. Is it possible to create clustered index on table variable. If yes how many we can create. I read that we can't create non-clustered index on table variable.
December 28, 2013 at 9:13 am
Search the articles on this site, there are a couple of good articles on exactly that topic.
Yes, you can have a clustered index on a table variable, yes you can have nonclustered indexes on table variables.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 28, 2013 at 9:52 am
Thank you. I got it so with table variable definition, we can create indexes but later we can't add indexes. But is there any limit for the no. of indexs
December 28, 2013 at 11:24 am
ramana3327 (12/28/2013)
But is there any limit for the no. of indexs
Yes, same as for any other table.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply