Why there are temporary table and table variable concepts in SQL server, when both of them provide the same functionality.
As table variable and temporary table uses the temp DB and have almost identical features.
Why there are temporary table and table variable concepts in SQL server, when both of them provide the same functionality.
As table variable and temporary table uses the temp DB and have almost identical features.
Though they look same, there are signficant differences.
Major differences
there are other differences. Just google it.
One major difference is that you can't use temporary tables in user defined functions, but you can use table variables. I would assume that's because of the difference in scope -- and I would assume this is the reason why table variables have been implemented.