获取指定表列名及备注: select * from syscolumns where id=object_id(N'表名') SELECT a.name [column], b.name type, a.prec length, isnull(c.value, ' ') [description] FROM syscolumns a LEFT OUTER JOIN systypes b ON a.xusertype = b.xusertype LEFT OUTER JOIN sys.extend
--查询所有列 select name from syscolumns where id=OBJECT_ID('PTS_ProjectTask') --列转为行 GetColumnJoin 'ProjectTask' alter proc GetColumnJoin @TableName nvarchar() as begin declare @tempStr nvarchar(),@ResultStr nvarchar(max) set @tempStr='' set @ResultStr='
示例实体: using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Diagnostics.CodeAnalysis; using Honeysuckle.Domain.Entities; namespace Chagoi.Pos.Core.Entity.Goods { [Table("a2")]