adspace


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

Or

Which Table variable I should use inside Stored procedure?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different SQL Server Versions you have worked on?

1088


What is subquery? Explain the properties of a subquery?

1077


How raid can influence database performance?

1133


What is self contained sub query?

1151


How can you append an identity column to a temporary table?

1083


If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?

1057


What is a scheduled job or what is a scheduled task?

1047


How do I find the sql server version?

1119


Disadvantages of the indexes?

1235


Why use identity in sql server?

1213


Why and when do stored procedure recompile?

1080


Can we shrink data file in sql server?

1141


What is the difference between upgrade and migration in sql server?

1196


Can we do dml on views?

1046


Why should you use or avoid select * statements?

1127