首页 > 代码库 > 获取SQL中某一列的类型及精度

获取SQL中某一列的类型及精度

SELECT @type=t.name, @prec=c.prec FROM sysobjects o
       JOIN syscolumns c on o.id=c.id
       JOIN systypes t on c.xusertype=t.xusertype WHERE o.name = @SortTable AND c.name = @SortName