What is the difference between table variable and a temporary table in sql.
Pradip Pandey
The temporary tables are stored in tempdb database of SQL server. The Table Variables are stored in both the memory and the disk in the tempdb database. The structure of Temporary Tables can be created even after its creation. ... In the example we have created a Temporary Table named as Employee.
Temporary Tables: 1)Not Pre-compiled 2)Transaction log recorded 3)Scope - session Table Variables: 1)Pre-compiled 2)Transaction log NOT recorded 3)Scope - variable