Solved

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

Posted on 2011-02-12
3
333 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 70

Assisted Solution

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

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql query 5 56
SQL profiler 3 49
How to add an Index to a date/time field? 15 39
T-SQL: Need to trim a single leading space 7 58
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

737 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