I have a table variable in a script (not a stored procedure). Two questions:
But you all forgot to mention, that if a variable table is used within a loop it will need emptying (delete @table) prior to loading with data again within a loop.