– 添加主键约束,并指定索引
alter table public_db_log add constraint pk_con_pri_key primary key (id_public_db_log) using index idx_id_public_db_log;
drop table public_db_log;
create table public_db_log(
id_public_db_log varchar2(32) default sys_guid() not null ,
package_name varchar2(500),
function_name varchar2(500),
user_desc clob,
error_log clob,
is_exception char(1) check( is_exception in('Y','N')),
created_date date default sysdate
);
comment on table public_db_log is '公共日志表';
comment on column public_db_log.user_desc is '用户描述语言';
comment on column public_db_log.error_log is '异常信息';
comment on column public_db_log.is_exception is '是否异常日志';
-- 创建索引
create unique index idx_id_public_db_log on public_db_log(id_public_db_log);
-- 添加主键约束,并指定索引
alter table public_db_log add constraint pk_con_pri_key primary key (id_public_db_log) using index idx_id_public_db_log;