Solved

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

Posted on 2011-02-12
3
324 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 70

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

821 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