I'm working on an assignment for school and it's for MySQL.
I have gotten stuck at the 'Views' topic of my assignment where it asks two very strange questions.
The assignment task is to save various different views and then upload a backup of the database to be graded.
Here's the problem though it seems that the things they are asking can't be done in a view.
The only way what they ask is to create the view and then execute a separate query to modify table(view) data.
Here's the odd questions that i can't figure out how to put in a view *Note i have re-worded the questions to avoid copyright issues.
- The view must insert a new row into a view(table),
I've been provided with the values they want saved in the view. The way it's written it implies that the INSERT query has to be in the view and executed when you execute the view.
- Wright a view that will drop(delete) another view?(is this even possible?)
After hours of searching I've found this can-we-write-update-and-delete-queries-in-views
This says that it can't be done not within the view's code anyway. Have my teachers miss printed what they want or am i missing something? I'm stumped.....
So like the title of this question says, Can you Automatically Modify tables when opening a view?