Possible Duplicate:
How do I Create a Comma-Separated List using a SQL Query?
I am working on a web application. I need the SQL query of single column selection like
select 
  recordid 
from 
  device 
where 
  accountid in (1,2)) 
I need this result to be formatted comma separated string from SQL.