Reputation: 345
Can we have array type data in sql server 2008 currently i am using comma seperated value to be treated as array value
Upvotes: 11
Views: 40686
Reputation: 3866
You can use instead:
1. Table
2. Temporary table
3. Table variable (2005+)
4. Table-valued parameters (2008+)
Upvotes: 7
Reputation: 5418
User-defined tables:
If you want to learn more, this article is widely referenced:
http://www.sommarskog.se/arrays-in-sql-2008.html
Table-value parameters were introduced in SQL Server 2008.
Upvotes: 3
Reputation: 238096
SQL Server 2005+ supports table-valued variables:
declare @arr table (col1 int)
insert @arr (col1) values (3), (1), (4)
These are equivalent to arrays.
Upvotes: 9