What is the difference between Temporary table variable and
a Table variable?

Or

Which Table variable I should use inside Stored procedure?

Answers were Sorted based on User's Feedback



What is the difference between Temporary table variable and a Table variable? Or Which Table..

Answer / oliva

There are major theoretical differences between temporary tables:
Temp table will show below
create table #T (…)
Table var will show below
And table variables:

declare @T table (…)
scope of table var is only inside the Store Procedure.

Is This Answer Correct ?    9 Yes 1 No

What is the difference between Temporary table variable and a Table variable? Or Which Table..

Answer / jagadeesh

transation can be rollback in temptable
but in tablevaribale we cannot do this

Is This Answer Correct ?    1 Yes 0 No

What is the difference between Temporary table variable and a Table variable? Or Which Table..

Answer / kava

instance varialble

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SQL Server Interview Questions

Join 3 tables (table1, table2 & table3) in a single query. Inner join should be applied for table1 & table 2 and left outer join for table1 & table3 where table2.dept is ABC

2 Answers  


What are the filtered indexes?

0 Answers  


What is save transaction and save point?

0 Answers  


What is intellisense?

0 Answers  


What is the difference between DTS and SSIS?

3 Answers   Allianz,






Tell me extended events in sql server 2008?

0 Answers  


Define outer join in sql server joins?

0 Answers  


i want to create procedure for create table in sql server 2005 for example create procedure create_table @table varchar(20) as create @table( id int, name char(20) ) but it will get error what is solution?

5 Answers   Aptech,


How to generate the Reports for the Database? I need an Example for it.Will we manually do this or else any script is there? Please let me know ASAP...

1 Answers   Cognizant,


Define candidate key, alternate key, composite key.

13 Answers   Infosys, Software India,


What is stored in the mssqlsystemresource database? : sql server database administration

0 Answers  


Explain basic SQL queries with SELECT from where Order By, Group By-Having?

3 Answers   TetraSoft, Wipro,


Categories