标签:varchar ext rom set data sql sele count ble
SELECT ‘/// <summary> /// ‘ + CAST(C.value AS NVARCHAR) + ‘ /// </summary> [DataMember] public string ‘ + CAST(B.name AS VARCHAR) + ‘ {get;set;}‘+CHAR(13) AS 属性 , ROW_NUMBER() OVER ( ORDER BY B.name ) AS rnum INTO #temp710 FROM sys.tables A INNER JOIN sys.columns B ON B.object_id = A.object_id LEFT JOIN sys.extended_properties C ON C.major_id = B.object_id AND C.minor_id = B.column_id WHERE A.name = ‘表名‘; DECLARE @i INT = 1; DECLARE @count INT = 42; DECLARE @tempColumn NVARCHAR(500) = ‘‘; WHILE ( @i <= @count ) BEGIN SELECT @tempColumn = 属性 FROM #temp710 AS t WHERE t.rnum = @i; PRINT @tempColumn; SET @i = @i + 1; END; DROP TABLE #temp710;
标签:varchar ext rom set data sql sele count ble
原文地址:https://www.cnblogs.com/li-lun/p/9441406.html