• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

fn_listextendedproperty - Get column DataType

How do you retrieve the column datatype from fn_listextendedproperty?  Or am I using the wrong one?

SELECT     objname, CAST([value] AS varchar(100)) AS name, *
FROM         ::fn_listextendedproperty(NULL, 'user', 'dbo', 'table', 'myTable', 'column', DEFAULT)
0
JElster
Asked:
JElster
1 Solution
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Since data types is not listed in the SSMS treeview, I believe the only way to get is to to look at the function T-SQL, and trace it back to a view or table, and look at it there.
0
 
Scott PletcherSenior DBACommented:
You need to look at sys.columns to get the column data type.  Extended properties will not necessarily contain the current data type.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now