Обсуждение: alter views

Поиск
Список
Период
Сортировка

alter views

От
"Sim Zacks"
Дата:
A couple months ago, I posted a function that allows a user to alter views
with dependencies.
I recently discovered another quick way to do it and thought I would share
it with the community.

1) Cretae a new view
2) Modify the dependent views to utilize the new view
3) drop the old view
4) rename the new view with the same name as the old view using alter table
viewname rename to newname

The views that referenced the newname automatically switch their reference
to the new name.
This is better for people who are uncomfortable with a function that first
drops the dependency list and then rebuilds them one at a time.