delete from(
select 1
from cust_interest a, cust_basicinfo b
where a.cust_no = b.cust_no
and b.cust_status <> '0');
select 1
from cust_interest a, cust_basicinfo b
where a.cust_no = b.cust_no
and b.cust_status <> '0');
delete from
cust_interest a
where exists (select 1
from cust_interest a, cust_basicinfo b
where a.cust_no = b.cust_no
and b.cust_status <> '0') )