插入视图时,也会插入其基表 [英] When view is being inserted,its base table is also inserted
本文介绍了插入视图时,也会插入其基表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我从基表中查看了一个视图。当在视图中插入一行时,也会插入基表。如何防止这种情况。?
I have made a view out of a base table.When insert a row in the view,base table is also get inserted.How can I prevent this.?
推荐答案
不要使用视图来插入或修改数据EVER。使用表而不是视图。如果您需要管理父/子结构,请使用存储过程和事务(如果数据需要它)!
Do not use views to insert or modify data EVER. Work with the tables not the views. If you need to manage parent/child structures use a stored procedure and a transaction if the data requires it!
这篇关于插入视图时,也会插入其基表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文