SQL Server doesn't support array's within or outside of stored procedures.
The closest thing that SQL Server has would be a table variable. It's accessed just like a regular or temp table, but it's done mostly in memory.
<pre>DECLARE @TableVar TABLE
(Col1 INT,
Col2 INT,
Col3 VARCHAR(10))
INSERT INTO @TableVar
SELECT 1, 2, 'test'
SELECT *
FROM @TableVar</pre>
Last Wiki Answer Submitted: March 16, 2008 11:46 pm by Denny Cherry64,520 pts.
All Answer Wiki Contributors: Denny Cherry64,520 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
Check out my SQL Server blog “SQL Server with Mr Denny” for more SQL Server information.