In SQL Server, you can use T-SQL to get the definition for a computed column by querying the sys.computed_columns
system catalog view.
Author: Ian
Return a List of Computed Columns in SQL Server
In SQL Server, there are a couple of system catalog views that enable you to get a list of computed columns in a database.
One of these views is called sys.computed_columns
. The other is sys.columns
.
3 Ways to Find Out if a Column is a Computed Column in SQL Server
This article presents three ways to use T-SQL to find out if a column is a computed column in SQL Server.
This is for when you know the column name, but you don’t know whether or not it’s a computed column.
Change an Existing Column to a Computed Column in SQL Server (T-SQL Example)
This article demonstrates how to use T-SQL to change an existing column to a computed column in SQL Server.
A computed column is a virtual column that uses an expression to calculate its value. The expression will typically use data from other columns. A computed column is not physically stored in the table unless it’s marked PERSISTED
.
Add a Computed Column to an Existing Table in SQL Server
This article demonstrates how to use T-SQL to add a computed column to an existing table in SQL Server.
A computed column is a virtual column that uses an expression to calculate its value. The expression will typically use data from other columns. A computed column is not physically stored in the table unless it’s marked PERSISTED
.
What is a Computed Column in SQL Server?
In SQL Server, a computed column is a virtual column that uses an expression to calculate its value.
A computed column will typically use data from other columns in its calculation. If data in any of those columns is updated, the computed column will automatically reflect the update in its calculation.
Continue readingCreate a Computed Column in SQL Server using T-SQL
This article demonstrates how to use T-SQL to create a computed column in SQL Server.
A computed column is a virtual column that uses an expression to calculate its value. The expression will typically use data from other columns. A computed column is not physically stored in the table unless it’s marked PERSISTED
.
How @@MAX_CONNECTIONS Works in SQL Server
In SQL Server, the @@MAX_CONNECTIONS
configuration function returns the maximum number of simultaneous user connections allowed on an instance of SQL Server. The number returned is not necessarily the number currently configured.
No argument is required. You can simply use it in a SELECT
statement to return the maximum number of simultaneous user connections allowed on the current server.
What is @@MAX_PRECISION in SQL Server?
In SQL Server, the @@MAX_PRECISION
configuration function returns the precision level used by decimal and numeric data types as currently set in the server.
No argument is required. You can simply use it in a SELECT
statement to return the precision level of the current server.
Difference Between sys.views, sys.system_views, & sys.all_views in SQL Server
Three of the system catalog views in SQL Server include sys.views
, sys.system_views
, and sys.all_views
.
These three catalog views all provide metadata about views in the database, but there’s a subtle difference between each view.