日期:2014-05-16  浏览次数:20921 次

【转载】mysql view prevents operation处理
原sql语句:

UPDATE radcheck set linkphone='3333' where id=(select a.id from vw_radcheck a where (1=1 and UserName = 'DHASDFJSADF'))
执行报错:the definition of table 'a' prevents operation UPDATE on table 'radcheck'

修改语句:
UPDATE radcheck set linkphone='3333' where id =(select b.id from (select id from vw_radcheck where (1=1 and UserName = 'DHASDFJSADF')) b)