You can also use "ALTER TABLE" to add an identity column to a temp table.
ALTER TABLE #TABLE ADD LineID NOT NUll IDENTORY(1,1)