Solved

What is Sql Server  Table Variable ? How do we use it and when ??

Posted on 2011-02-12
3
308 Views
Last Modified: 2012-06-21
What is Sql Server  Table Variable ? How do we use it and when ??
0
Comment
Question by:N_Sri
3 Comments
 
LVL 69

Assisted Solution

by:Éric Moreau
Éric Moreau earned 200 total points
ID: 34880302
0
 
LVL 40

Accepted Solution

by:
Sharath earned 300 total points
ID: 34880368
like scalar variables which can hold scalar data, you can declare table variables to hold the tabular data.  table variables are like temp tables but there are few differentiating factors between both of them.

you can use table variables to store the intermediate data from your queries and use those table variables further in your code.

http://odetocode.com/code/365.aspx
http://www.sqlteam.com/article/using-table-variables
http://msdn.microsoft.com/en-us/library/ms188927.aspx
0
 

Author Closing Comment

by:N_Sri
ID: 34930266
ty
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Service Statictic 11 30
Query Peformance + mulitple query plans 9 48
xpath sql query 2008 8 44
Writing SQL Select Query result to a text file 12 30
I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now