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

How to set database to be single_user in ms sql server?

761


List few advantages of stored procedure.

723


What is trigger explain with program?

708


How to get nth highest salary from employee table.

793


What is impersonation? What are the different impersonation options available in ssas? : sql server analysis services, ssas

724






Can you import Microsoft Excel data to SSRS?

111


What is full outer join in sql server joins?

733


What are cursors and when they are useful?

740


What are the differences between char and varchar in ms sql server?

754


Can you explain full-text query in sql server?

759


What is the dbcc command and why is it used?

760


Can two tables share the same primary key?

682


How to get a list of all tables with "sys.tables" view in ms sql server?

762


How can you check the version of sql server?

775


what is checksum in sql server.........???

1376