Solved

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

Posted on 2011-02-12
3
295 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
Comment Utility
0
 
LVL 40

Accepted Solution

by:
Sharath earned 300 total points
Comment Utility
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
Comment Utility
ty
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SQL Server 2008 backup issue 3 19
SQL Query Assistance 4 30
Counting Distinct values in two columns 3 13
encyps queries mssql 15 24
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

10 Experts available now in Live!

Get 1:1 Help Now