declare @ts varchar(999)select @ts=isnull(@ts+',','')+name from sysobjects where xtype='U'select @ts as ts