could a sql select statement be equal to an array

for example

select * from names where nameid = a[]

where a[] is the array


a[] is 7, 8, 9

how to loop through
LVL 1
rgb192Asked:
Who is Participating?
 
chapmandewCommented:
No. You'd have to use XML
0
 
apexpertCommented:
no but you can use this as......

select * from names where nameid in (1,2,3,4,5,6,7,8)
0
 
SharathData EngineerCommented:
How are you passing array values? ultimately you should build a query like this.

select * from names where nameid in (7,8,9)

Let us know how are you passing the array values.
0
 
Rakesh JaiminiCommented:
you can check
How to pass a list of values or array to SQL Server stored procedure?
http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm
0
 
rgb192Author Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.