DECLARE @NAMES VARCHAR(1000)SELECT @NAMES = ISNULL(@NAMES+',','')+ColumnCode FROM DB_TableColumns WHERE TableCode='faFixedAssets' ORDER BY UIDselect @NAMES 转载于:https://www.cnblogs.com/gaoshoubuduo/archive/2012/01/05/2312643.html