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
30.0k294448654
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:

×409
×31
×25
×11

question asked: 14 Jun '12, 10:00

question was seen: 1,022 times

last updated: 15 Jun '12, 03:54