• Neat use of update. This can also be done using the FOR XML construct:

    select SUBSTRING((SELECT (',' + id) FROM teste ORDER BY id FOR XML PATH('') ), 2, 1000)