February 5, 2013 at 4:51 pm
Hi All,
Thanks for your time to look in to my question.
I am reading an article in the current SQL Server Magazine about "TYPE TABLE". I don't understand it well. Is it similar to "User Defined Table Types" or something else?
If it is different, can you point me to a source where I can learn the concept behind it.
Thanks!
Siva.
February 5, 2013 at 5:58 pm
Table Types are very similar to Table Variable in many ways. Their main use is as a parameter to a Stored Procedure, known as "Table-valued Parameters."
Use Table-Valued Parameters (Database Engine) - SQL Server 2012
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
February 5, 2013 at 8:02 pm
You can define them to hold data, data let's say you want to pass to a proc or a function (as OPC stated). Consider this usage:DECLARE @test-2 AS IntegerTable
INSERT INTO @test-2(IntegerValue)
SELECT 1 UNION ALL
SELECT 2 UNION ALL
SELECT 3 UNION ALL
SELECT 4 UNION ALL
SELECT 5
SELECT * FROM fx_MyReallyCoolTableValuedFunction(@Test)
______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply