I'm creating a temporary table via a SELECT INTO
. I'd like to create the temp table then add a column to it like so:
SELECT id, name, val
INTO #TEMP_TBL
ALTER TABLE #TEMP_TBL ADD new_col AS DECIMAL
Error: Invalid column name 'DECIMAL'.
Where am I going wrong here?