DECLARE @tmp_Table table (StudID int Primary key,StudName VARCHAR(2000),Class VARCHAR(50))
CREATE INDEX Idx1 ON @tmp_table(StudID)
CREATE table #tmp_Table (StudID int Primary key,StudName VARCHAR(2000),Class VARCHAR(50))
CREATE INDEX Idx1 ON #tmp_table(Class)
I execute above...