Code:
Select FirstName into #TestRank
From (
Select 'Tom' FirstName
Union
Select 'Dick'
Union
Select 'Harry'
)Students
order by FirstName
Alter table #TestRank add Ctr int IDENTITY
--Why does it Work if I use Select *
Select * from #TestRank
-- When I use This
Select Ctr, Studentfirstname from #TestRank
-- I get this Error Invalid column name 'Ctr'
drop table #TestRank