Tipul de date table reprezinta dupa cum spune si numele un tabel. Poate fi folosit ca un tabel temporar:
DECLARE @MyTable TABLE (ID INT PRIMARY KEY, VAL VARCHAR(64))
INSERT INTO @MyTable VALUES (1, 'Cristian')
INSERT INTO @MyTable VALUES (2, 'Sorin')
SELECT * FROM @MyTable
ORDER BY ID DESC
GO
-- Output
ID VAL
2 Sorin
1 Cristian
Cristian Andrei Lefter, SQL Server MVP
MCT, MCSA, MCDBA, MCAD, MCSD .NET,
MCTS, MCITP - Database Administrator SQL Server 2005
http://sqlserver.ro