从视图中删除一行,是否会从创建该视图的基表中删除相应的行?我正在使用MySQL.
Deleting a row from a view, will it delete the appropriate rows from the base tables that the view was created upon? I am using MySQL.
推荐答案是的,它将.唯一需要注意的是权限.
Yes, it will. The only thing to watch out for, is permissions.
引用官方文档
有些观点是可更新的.那是你 可以在诸如以下的语句中使用它们 UPDATE,DELETE或INSERT进行更新 基础表的内容. 为了使视图可更新,必须 是一对一的关系 视图中的行和中的行 基础表.也有 某些其他构成 查看不可更新.
Some views are updatable. That is, you can use them in statements such as UPDATE, DELETE, or INSERT to update the contents of the underlying table. For a view to be updatable, there must be a one-to-one relationship between the rows in the view and the rows in the underlying table. There are also certain other constructs that make a view nonupdatable.
更多推荐
从视图中删除行会从基表
发布评论