select * from information_schema.domains ----获取用户定义数据类型信息结果集里面的data_type字段

解决方案 »

  1.   

    是sql server 2005及以后的版本不,如果是,可以这样:select t.name,c.name,tp.name
    from sys.tables t
    inner join sys.columns c
            on t.object_id = c.object_id
    inner join sys.types tp
            on tp.system_type_id = c.system_type_id
               and tp.system_type_id = tp.user_type_id
    where t.name = '表'