Rudra, stop trying to find a reason why there's anything wrong with table variables. Look them up in the BOL. It states:
Functions and variables can be declared to be of type table. table variables can be used in functions, stored procedures, and batches.
Use table variables instead of temporary tables, whenever possible. table variables provide the following benefits:
- A table variable behaves like a local variable. It has a well-defined scope, which is the function, stored procedure, or batch in which it is declared.
Within its scope, a table variable may be used like a regular table. It may be applied anywhere a table or table expression is used in SELECT, INSERT, UPDATE, and DELETE statements. However, table may not be used in the following statements:
INSERT INTO table_variable EXEC stored_procedure
SELECT select_list INTO table_variable statements.
- table variables are cleaned up automatically at the end of the function, stored procedure, or batch in which they are defined.
- table variables used in stored procedures result in fewer recompilations of the stored procedures than when temporary tables are used.
- Transactions involving table variables last only for the duration of an update on the table variable. Thus, table variables require less locking and logging resources.