Quality Testing

Quality is delighting customers

What happen if a columns with a view created from multiple table is deleted

Hi Team

 This is a  interview question.when  a view is creted with multi tables and if one of the columns is deleted ? What is the impact.Can you guys explain me in detail?

Views: 62

Reply to This

Replies to This Discussion

Hi R.Subramanian,

When a view is created from columns of one or more tables and any one of the column is deleted which is used in view then view will stop working (will return error). This is because view is logical concepts, it does not hold any data, it only holds the schema. Whenever view is accessed it reads and validate the schema. If column is not present then it will return an error. But if you deleted a column which is not used in view then the view will continue to work properly.

To overcome this, you need to replace the view by "CREATE OR REPLACE VIEW ..." command.

-Ravi

It will give Error as "deleted column not found" in execution of view.

 

Chandan

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service