Home > Back-end >  View data in mysql changes affect the original table data
View data in mysql changes affect the original table data

Time:12-03

Remember is not to be modified, but just try once, single change in the table view is will affect the original table data, two tables are testing,

CodePudding user response:

Really have nothing to say, if the view is data from a table, modify data in a view, table data will update, and modify data in the table, the corresponding view will be updated, but if the view data from two tables, modify the view data error, cannot be modified, create a view directly using the create view aaa as select * from the test. Don't use other keywords,

CodePudding user response:

Why not use the update

CodePudding user response:

View is a collection of query statements, has no effect on the original data,

CodePudding user response:

Single table can DML. The table can't

CodePudding user response:

Modify the view data will modify the original table data, tested

CodePudding user response:

To tell the truth view is to avoid, you are used to modify ~

CodePudding user response:

refer to 6th floor maradona1984 response:
the truth view is to avoid, you have to change ~
was studying, in all kinds of blind test,,,

CodePudding user response:

View is a query result set of table data, view data cannot be modified, want to modify the data need to modify the single table data, view data will be changed

CodePudding user response:

View is a collection of query statements, has no effect on the original data, organize a set of word of mouth is wonderful, very highly of video, share with you at http://mrw.so/5eOtLh

CodePudding user response:

In DB2,
If the view is derived from multiple tables, are not allowed to update
View field from expression or constant, are not allowed to update
View field from the set function, are not allowed to update
Group view, are not allowed to update
The view contains DISTINCT phrases, not allowed to update
Not allowed to update the view defined on view are not allowed to update
  • Related