isnull(stuff((select ',' + d.comname from projemp a left outer join emps c on a.empid = c.empidleft outer join coms d on a.comid = d.comidwhere a.ProjID = @planprojid for xml path('')), 1, 1, ''), '')
创建新表:1,五要素 2,not null 3,默认值 4,字段注释,表名称 5,索引 6,指定约束名称 -- ------------------------------ Table structure for Table-- ----------------------------IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[TableName]') AND type IN ('U'