Archives of the TeradataForum
Message Posted: Tue, 04 Feb 2014 @ 17:10:15 GMT
Subj: | | Re: 1:1 Views - Sel * from Table OR SELECT all columns from table |
|
From: | | Geoffrey Rommel |
As Fred says, "sel *" is resolved when the view is created, so it is equivalent to selecting all the columns that exist at that time.
If new columns are added to the table or existing columns are renamed, the "sel *" view does not "break" -- i.e. it does not return an error --
but it won't return all the columns. This would probably be undesirable.
If columns are deleted, the view will return an error because an expected column no longer exists.
When I first became a DBA many lunations ago, my manager insisted on spelling out every column in the view definitions. This still seems a good
practice to me.
|