从视图中删除行会从基表-MySQL中删除行吗? [英] Does deleting row from view delete row from base table - MySQL?

查看:347
本文介绍了从视图中删除行会从基表-MySQL中删除行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从视图中删除一行,是否会从创建该视图的基表中删除相应的行?我正在使用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.

这篇关于从视图中删除行会从基表-MySQL中删除行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆