Both gets created in tempdb database , Create temporary table or table variable and open tempdb database and run following command , you will be able to see objects created there.SELECT * FROM SYS.OBJECTS ORDER BY OBJECT_ID DESCBy running above command you will be able to see temporary table although you will not be able to see table variable because it get decomposed as soon as it gets created. Though it gets created in Tempdb database