Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

BIT Barbarian

After working in the mortgage industry for 7 years, I transitioned into Business Intelligence and began learning SQL and .NET. My goal is to integrate my business knowledge into my development to intelligently analyze and find solutions to problems. Blogging offers me an option to share what I've learned as well as receive feedback on better practices and solutions.

View computed columns in database

Snippet to quickly view computed column information. You can also view this by doing a “create table” script. This however, was a little cleaner to read and view for me.

select
	database_name = db_name()
	,object_schema_name = object_schema_name( object_id )
	,object_name = object_name( object_id )
	,full_object_name = object_schema_name( object_id ) + '.'
	+ object_name( object_id )
	,column_name = name
	,cc.is_persisted
	,cc.Definition
from
	sys.computed_columns cc
order by
	full_object_name asc

 

Comments

Leave a comment on the original post [www.bitbarbarian.com, opens in a new window]

Loading comments...