What is the difference between temp table and table variable?

Answer Posted / rathikapoobalan

1. If we use Temporary Table in a stored procedure, We
should drop it at the end.
It is not necessary in the case of Table variable.

2. In Table variable we can hold maximum of 20000 records
only. If it exceeds, we can use temporary table

Is This Answer Correct ?    11 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between materialized view and view?

491


What is after dml trigger?

574


What is a covered index?

521


How to execute a stored procedure in ms sql server?

554


How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?

682






List some of the rules that apply to creating and using a ‘view’

500


Suppose we have a table "MyTable" containing 10 rows, what query should be executed to update the odd rows "Salary" as 9000?

583


explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

591


what exactly sql injuction.how to overcome.....

2043


Explain about thread and memory management process of SQL?

540


How does the report manager work in SSRS?

116


Give an example of SQL injection attack ?

570


Tell me what is log shipping?

571


What is the use of floor function in sql server?

553


1.what is the diff between nolock optimizer and read uncommitted isolation? 2.what is the diff between revoke and deny? 3.what is percieved down time? 4.whether password protection are required for backups?if yes why?if no why? 5.what is fill factor? 6.what is cost analysis? 7.what is mean by piece meal restore? 8.what is 'rowguidcol'? 9.impersonate permission? 10.what is selectivity?

1629