Hi all,
I'd like to produce via query the precision and scale values of any decimal data type fields in a table. Using sys.columns I am able to get precision but not scale...any ideas on how/if I can squeeze scale in there? Code is:
SELECT O.name AS Object_Name
,c.name AS column_name
,t.name AS type_name
,c.max_length
,c.precision
/* I'd like to insert scale here */
FROM sys.columns AS c
JOIN sys.types AS t ON c.user_type_id=t.user_type_id
JOIN sys.objects AS O ON C.object_id = O.object_id
WHERE O.name = 'MyTableName'
Thanks for looking!
Brian