Table variables Vs Temporary table

Table variables: It’s similar to local variable, they are used to hold small amount of data (around 500 rows) and available within the scope of the batch, stored procedure,  functions. Syntax for table variables:

The advantage of table variables over CTE is that they accessed during the entire batch or session.

Temporary tables: are […]

Read More