简体   繁体   中英

Deleting a record from a view in MySQL

I have a view in MySQL with two tables joined together. I am using Dreamweaver to delete a record from this view, but I get an error saying: Can not delete from join view 'SCHEMA.TABLE'

I wish to delete records from both tables. Do I have to add all the attributes from both tables into the view?

In most cases, you cannot delete a record from a view, for a view is 'a view' into another table. So you would have to lookup the query / configuration that is responsible for generating the view and delete the record from the underlying table, tied to the view. In actuality this will delete the record from one table only but will accomplish what you want, the illusion of deleting the record from 'both' tables.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM