is_computed property on view is not correct

Modestas Dromantas 21 Reputation points
2021-10-28T08:29:54.377+00:00

A computed column on a table, which is used in view select list, sys.column is not giving correct is_computed property value even after sp_refreshView.

CREATE VIEW dbo.some_view
AS
SEELCT [Computed_column]
FROM dbo.some_table

In sys.columns Computed_column for view will be false, but for table it is true.

Is there any way to work around this? Are there any reasons why a computed property is not reflected, metadata as is_nullable works fine.

Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,555 questions
0 comments No comments
{count} votes

Accepted answer
  1. EchoLiu-MSFT 14,571 Reputation points
    2021-10-28T09:47:14.773+00:00

    The view is a virtual table, Computed_column for view is always false.


0 additional answers

Sort by: Most helpful