cancel
Showing results for 
Search instead for 
Did you mean: 

Can a view be ALTERed automatically when the underlying table is altered?

VolkerBarth
Contributor
3,455

When I declare a view as

CREATE VIEW myView AS SELECT * FROM MyTable

and ALTER TABLE MyTable lateron by adding columns, it seems that v10 and above adapt the view automatically, i.e. the view contains the added table columns, too, though I haven't used ALTER VIEW on that view.

Is that by design?

(With v8, I surely have to call ALTER VIEW explicitly to include the newly added columns.)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Tracking view dependencies, and automatically re-compiling views due to base table changes, was a v10 feature.

VolkerBarth
Contributor
0 Kudos

Thanks for the clarification - though I was aware of those "view dependencies" I just had not noticed this side effect for "SELECT *" views. A nice feature:)

reimer_pods
Participant

"Watcom does it the way it should be done" 😉

Answers (0)