oracle创建表主键触发器

当插入时,自动生成GUID作为主键,代码如下:
CREATE OR REPLACE TRIGGER tr_company
before 
insert on company
  
for each row
begin
select sys_guid() into :new.COMPANYID from dual;
end;
原文地址:https://www.cnblogs.com/scottckt/p/1355732.html