在SQL 的查询分析器中建立触发器
create trigger update_yourtable on user for update
--请将表名改成别的在SQL里USER似乎是保留字
as
update Shop_user set shop_user.usertype=user.userclass where sid in(select uid from inserted)
方法一:exists子句
SQL> delete from a where exists (select 'X' from b where a.bm=b.bm and a.mc=b.mc);
where条件:如果两个表中都拥有相同字段的主键(primary key),则只需比较两个主键就可以了
方法二:in子句
SQL> delete from a where (bm,mc) in (select bm,mc from b);
你自己总结吧!这我以前的删除用的!原理差不多!