Getting column definitions of SQL Server views

I needed the definitions (data type, length and nullability) of columns in some SQL Server views so I can replicate the structure as table in test system.

Turns out it’s super easy to get this information.

Just execute this statement:

EXEC SP_HELP {view_name};

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.