[sql] Best way to create a temp table with same columns and type as a permanent table