3 ms·
SQL Server behaviour is: If you have a "select *" view and then add more columns to underlying table, columns will not show up in view until view if refreshed
by codeulike 13y ago
SQL Server behaviour is: If you have a "select *" view and then add more columns to underlying table, columns will not show up in view until view if refreshed
Thats not too bad, and it does not get the column names mixed up.
- sciolistse 13y agoThat's the way it works now. In earlier versions any added columns would still be retrieved, shifting all the other column values to the right.. So all the data would wind up having the wrong column names.
- codeulike 13y agoI've been using MS Sql from version 7, through 2000, 2005, 2008 etc, and I never saw that bug.
- einhverfr 13y agoThat's also the way it works in PostgreSQL. I think the view is actually compiled into a parse tree with named columns, and the view given a defined type iirc. (Select * from ... in PostgreSQL is actually really usefun in anything object-relational because you get objects of a named type back btw.)