请大家分析如下语句,看oracle是怎么工作的? delete from( select 1 from cust_interest a, cust_basicinfo b where a.cust_no = b.cust_no and b.cust_status <> '0'); 这个语句是删除cust_interest表中的数据,我就是不知道oracle怎么确定删除cust_interest表而不是cust_basicinfo表数据, 请大家指导一下,谢谢。
SQL Error: ORA-01752: cannot delete from view without exactly one key-preserved table 01752. 00000 - "cannot delete from view without exactly one key-preserved table" *Cause: The deleted table either had no key perserved tables, had more than one key-preserved table, or the key-preserved table was an unmerged view or a table from a read-only view. *Action: Redefine the view or delete it from the underlying base tables.
------解决方案--------------------
SQL code
[Quote=引用:]
delete from(
select 1
from cust_interest a, cust_basicinfo b
where a.cust_no = b.cust_no
and b.cust_status <> '0');
这个语句是删除cust_interest表中的数据,我就是不知道oracle怎么确定删除cust_interest表而不是cust_basicinf……
[/Quote]
这个语句本身写法,我都觉得没有见过!
------解决方案-------------------- 同样表示没有见过,同样求解。。。