-- Create Sequence
Create sequence seq_common_log
Minvalue 1
Max value 999999999999999999999999999
Start with 1
Increment by 1
Cache 20;
-- Create Table
Create Table tu_common_log
(
Col_sequence number (20) not null,
Col_date date default sysdate not null,
Col_system varchar2 (100 ),
Col_package varchar2 (100 ),
Col_function_procedure varchar2 (100 ),
Col_message varchar2 (4000 ),
Col_is_exception varchar2 (1) default 'n'
)
Tablespace users
Pctfree 10
Initrans 1
Maxtrans 255
Storage
(
Initial 64 K
Next 1 m
Minextents 1
Maxextents Unlimited
);
-- Add comments to the table
Comment on table tu_common_log
Is 'General log table ';
-- Add comments to the columns
Comment on column tu_common_log.col_sequence
Is 'record sequence (obtained from seq_common_log )';
Comment on column tu_common_log.col_date
Is 'record generation time ';
Comment on column tu_common_log.col_system
Is 'Ownership system ';
Comment on column tu_common_log.col_package
Is 'Log package ';
Comment on column tu_common_log.col_function_procedure
Is 'function or stored procedure of the log ';
Comment on column tu_common_log.col_message
Is 'Log details ';
Comment on column tu_common_log.col_is_exception
Is 'whether the log is abnormal information y indicates exception information n indicates non-Exception Information ';