Wednesday, July 7, 2010

Temperory Tables and Table Variables in SQL 2008

This is one of queries programmers would have come across. And you may face this question when you attend a technical viva session.

There are primary 3 differences i can say

1) There are no transaction logs recorded for table variables. That being said, it is out of transaction mechanism.

2) Any piece of code, say stored procedure will not be compiled if temperory table exists where as one with table variable can be pre-compiled. This boost the performance when use table variables.

3) The scope of the table variable is limited to the local scope. In essence, table variables will not be available for inner stored procedures and statements.

Hope this helps.!

SQL Server 2008

As all of you are aware, the latest version of SQL Server in the market is 2008 with all new features and enhancements. Going forward, I would like to utilize this blog to discuss the SQL 2008.

Thanks for reading...

3, 2, 1 - Kick Off !

This is my first BLOG on SQL Server. I thought of writing this a year back. However I didnt have the time. I now realize that there is so much information that I come across that is truly useful and I don't always have time to write an article. In many cases the ideas don't require an entire article anyway. Blogging seems to make a lot of sense as an actual time saver for me.

Thanks for reading and I hope all my time and effort helps (or at least entertains) you on many levels.

Sincerely,
Sign-Off