Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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
40.2k361550822
accept rate: 34%

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.8k576106
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:

×438
×34
×31
×12

question asked: 14 Jun '12, 10:00

question was seen: 3,132 times

last updated: 15 Jun '12, 03:54