Filter all the information in the specified table

zhaozj2021-02-16  53

Select Name = Case When a.colorder = 1 Then D.Name Else '' end, table Description = Case When a.colorder = 1 THEN INULL (F.Value, '') Else '' end, field number = a. Colorder, Field Name = A.Name, Identifies = Case When ColumnProperty (A.ID, A.Name, 'Isidentity') = 1 Then '√'ELSE' 'End, Programs = Case WHEN EXISTS (SELECT 1 from sysobjects where xtype = 'Pk' and name in (select Name from sysindexes where indid in (select indid from sysindexkeys where id = a.id and color = a.colid))) "√ 'else' end, type = B.Name, Total bytes = a.length, length = columnproperty (A.ID, A.NAME, 'Precision'), count number = ISNULL (ColumnProperty (A.ID, A.NAME, 'Scale'), 0), Allow empty = case when a.isnullable = 1 Then '√'lse' 'end, default = isnull (E.TEXT,' '), field description = ISNULL (g. [Value],' ') from syscolumns a left JOIN SYSTYPES B on A.XTYPE = B.XUSERTYPE INNER JOIN SYSOBJECTS D on A.ID = D.ID and D.XTYPE = 'u' and D.Name <> DTPROPERTIES 'LEFT JOIN SYSCOMMENTS E ON A. CDEFAULT = E .id left join sysproperties g on a.id = g.id and a.colid = g.smallid left join sysproperties f on d.id = f.id and f.smallid = 0 - where d.name = 'To query Table '- if only Query the specified table, plus this condition Order by A.ID, A.COLORDER

Thank ZJCXC (Zou Jian)

转载请注明原文地址:https://www.9cbs.com/read-19296.html

New Post(0)