日期:2014-05-17 浏览次数:20424 次
Select C.NAME As ObjName, A.Name As FldName, B.Name As TypeName, A.Length From SYSCOLUMNS A Inner Join SYSTYPES B On A.xtype = B.xtype Inner Join SYSOBJECTS C ON A.ID = C.ID Where C.xtype = 'U' And B.Name = 'Text'
------解决方案--------------------
select b.name as Tab,a.name as Col,a.max_length as Len from sys.columns a inner join sys.tables b on a.object_id = b.object_id inner join sys.types c on a.system_type_id = c.system_type_id and c.name <>'sysname' where c.name = 'text'
------解决方案--------------------
SELECT OBJECT_NAME([object_id]) AS table_name ,name AS column_name FROM sys.columns WHERE system_type_id=TYPE_ID('text')