No
See: Table Variable Identity Column. It is best to use #TempTable in these cases-then you may Truncate or use DBCC to reseed. You will reap performance improvements with Truncate and be able to create additional indexes. I'd add to the  technically  correct answer of using DELETE @VariableTable that if you happen to also have an Identity-Field in your @Table Variable (e.g. i int (1,1)) and you'd like to re-use this table (even if you re-declare it in a loop) it is still within scope and there it no way to reseed it either. 4. It would be more accurate to say the DELETE is the better option. Nothing to do with table variables you get the same with a #temp table and DELETE. This is quite an edge case in that the 10 rows all fit on one page. TRUNCATE deallocates the last page from the table and DELETE doesn't The DML documentation, however, does not include the TRUNCATE TABLE statement, although the statement, like DELETE, also lets you delete data from a SQL Server table. Of all the DML statements, the DELETE statement is probably the easiest to use.  Removes all rows from a table or specified partitions of a table, without logging the individual row deletions. TRUNCATE TABLE is similar to the DELETE statement with no WHERE clause; however, TRUNCATE TABLE is faster and uses fewer system and transaction log resources. Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database, Azure SQL Data Warehouse Public Preview. Less transaction log space is used. The DELETE statement removes rows one at a time and records an entry in the transaction log for each deleted row. TRUNCATE TABLE removes the data by deallocating the data pages used to store the table data and records only the page deallocations in the transaction log. DML on both table variables and temp tables writes to the tempdb transaction log. Whether or not it is worth switching to TRUNCATE rather than DELETE depends on the size of data involved. TRUNCATE will just log the page deallocations. DELETE will log the actual deleted values. I'd add to the  technically  correct answer of using DELETE @VariableTable that if you happen to also have an Identity-Field in your @Table Variable (e.g. i int (1,1)) and you'd like to re-use this table (even if you re-declare it in a loop) it is still within scope and there it no way to reseed it either. TRUNCATE TABLE removes all rows from a table, but the table structure and its columns, constraints, indexes, and so on remain. To remove the table definition in addition to its data, use the DROP TABLE statement. Less transaction log space is used. The DELETE statement removes rows one at a time and records an entry in the transaction log for each deleted row. TRUNCATE TABLE removes the data by deallocating the data pages used to store the table data and records only the page deallocations in the transaction log. Syntax. truncate_table ::=. Semantics. TABLE Clause. Specify the schema and name of the table to be truncated. This table cannot be part of a cluster. If you omit schema, then Oracle Database assumes the table is in your own cluster. You can truncate index-organized tables and temporary tables. When you truncate a temporary table, only the rows created during the current session are removed. Oracle Database changes the NEXT storage parameter of table to be the size of the last extent deleted from the segment in the process of truncation. Restrictions on Truncating Tables This statement is subject to the following restrictions: You cannot individually truncate a table that is part of a cluster. You must either truncate the cluster, delete all rows from the table, or drop and re-create the table. Step 2: Get the table name and save it in a user variable. Step 3: Truncate the table in Step 2. Step 2: In order to complete this step, I am going to use an SQL query to get the table name, and then the returned result will be stored in user variable that I declared as vSourceTable of type String.  Thanks for the clarification. You are looking for truncate table to work with table variables. This is currently not supported. Table variables in general use less logging and the perf difference between delete and truncate may not be that significant unless lots of rows are involved. However, this does seem like a valid enhancement suggestion.
http://stackoverflow.com/questions/22046487/truncate-clear-table-variable-in-sql-server-2008 http://stackoverflow.com/questions/2646695/sql-server-temporary-tables-with-truncate-vs-table-variable-with-delete https://www.simple-talk.com/sql/learn-sql-server/the-delete-statement-in-sql-server/ https://msdn.microsoft.com/en-us/library/ms177570.aspx http://stackoverflow.com/questions/22046487/truncate-clear-table-variable-in-sql-server-2008 https://msdn.microsoft.com/en-us/library/ms177570.aspx http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10007.htm https://irfansworld.wordpress.com/2011/07/31/how-to-truncate-and-load-a-table-from-ssis/ http://connect.microsoft.com/SQLServer/feedback/details/331444/truncate-table-parameter
can you truncate a table variable