我正在为票证表创建一个触发器,当票证的状态从“未支付”(3)转到“付费”(4)时,该表将被激活。我还得打印一条信息,上面写着A是在B上付款的,其中A是票证ID,B是付款日期。|| ' was paid on' || :new.paydate);测试它:set status=2lid int, --- lot where violation took place
ttype int, -- ticke
Table1和Table2id tid2 200Table2100 A我想从Table1拿出任何Table2中不存在的tid的id。请帮助我如何写一个这样的查询,这样的方式,它将减少时间。select id from Table1 where tid not in (select tid from Table2)
select a.id from Table1 a inner joinTable2 b o