SQL Server Mgmt Studio is driving me crazy.
If I create a view and SELECT '*' from the table, everything is OK and I can save the view. A look at the SQL for the view (for example, the CREATE script) shows that "SELECT *" is actually stored in the SQL view.
But as soon as I re-open the view using the GUI (right-click> edit), SELECT * will be replaced with a list of columns of all columns in the table.
How can I stop Management Studio from doing this? I want my SELECT to stay that way.
Perhaps this is just a googling 'SELECT *' difficulty that prevented me from finding something remotely relevant to this (I put it in double quotes).
Please, I am very experienced in Transact-SQL, so please do not give me lectures on why I should not use SELECT *. I know all the pros and cons, and I sometimes use it. This is a language function, and, like all language functions, it can be used for good or evil (I strongly disagree that I should never use it).
Edit: I give Mark the answer, as it seems that this behavior cannot be disabled. The problem is considered closed. I note that Enterprise Manager did nothing of the kind. The workaround is to either edit SQL as text, or switch to another product besides Managment Studio. Or, constantly edit the column list and replace * each time you edit the view. Sigh.
source share