The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

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.)

asked 14 Jun '12, 10:00

Volker%20Barth's gravatar image

Volker Barth
29.3k287438645
accept rate: 32%

edited 14 Jun '12, 10:01


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

permanent link

answered 14 Jun '12, 12:41

Glenn%20Paulley's gravatar image

Glenn Paulley
10.7k568104
accept rate: 43%

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:)

(15 Jun '12, 03:09) Volker Barth
1

"Watcom does it the way it should be done" ;-)

(15 Jun '12, 03:54) Reimer Pods
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×404
×31
×24
×11

question asked: 14 Jun '12, 10:00

question was seen: 982 times

last updated: 15 Jun '12, 03:54