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

In what sequence sql statement is processed?

0 Answers  


what is the basic diffrence betn a col declared in char(1) and in varchar(1)

2 Answers  


how to get the maximum among two tables,for example table 1 (dep1) have (emp_id,emp_name,salary) columns and table 2 (dept2) have (emp_id,emp_name,salary) columns,i want which employee have the maximum salary among two tables?

9 Answers   Deloitte, Lason,


what’s the difference between Covering Indexes and Clustered Indexes ? how to use clustered index small ?

0 Answers  


Which operator do you use to return all of the rows from one query except rows are returned in a second query?

0 Answers  






How to make remote connection in database?

0 Answers  


What are the aggregate and scalar functions?

0 Answers  


What is delete query?

0 Answers  


Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?

0 Answers  


Can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible?

0 Answers  


What is a Join and explain its types?

0 Answers  


Define inner join in sql server joins?

0 Answers  


Categories