spool myblog.logprompt
prompt Creating table FAVORITE
prompt =======================
prompt
create table FAVORITE
(
FAVORITE_ID NUMBER(10) not null,
USERNAME VARCHAR2(16),
LOG_ID NUMBER(10)
)
tablespace SYSTEM
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table FAVORITE
add primary key (FAVORITE_ID)
using index
tablespace SYSTEM
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);prompt
prompt Creating sequence FAVORITE_INSERT
prompt =================================
prompt
create sequence FAVORITE_INSERT
minvalue 1
maxvalue 9999999999999999999999999999
start with 21
increment by 1
cache 20;prompt
prompt Creating trigger PAVORITE_TRIGGER
prompt =================================
prompt
CREATE OR REPLACE TRIGGER "PAVORITE_TRIGGER" BEFORE
INSERT ON "FAVORITE" REFERENCING OLD AS old NEW AS new FOR EACH ROW
begin
select favorite_insert.nextval into:new.favorite_id from dual;
end;
/spool off
prompt Creating table FAVORITE
prompt =======================
prompt
create table FAVORITE
(
FAVORITE_ID NUMBER(10) not null,
USERNAME VARCHAR2(16),
LOG_ID NUMBER(10)
)
tablespace SYSTEM
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table FAVORITE
add primary key (FAVORITE_ID)
using index
tablespace SYSTEM
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);prompt
prompt Creating sequence FAVORITE_INSERT
prompt =================================
prompt
create sequence FAVORITE_INSERT
minvalue 1
maxvalue 9999999999999999999999999999
start with 21
increment by 1
cache 20;prompt
prompt Creating trigger PAVORITE_TRIGGER
prompt =================================
prompt
CREATE OR REPLACE TRIGGER "PAVORITE_TRIGGER" BEFORE
INSERT ON "FAVORITE" REFERENCING OLD AS old NEW AS new FOR EACH ROW
begin
select favorite_insert.nextval into:new.favorite_id from dual;
end;
/spool off
(
FAVORITE_ID BIGINT(10) primary key auto_increment,
USERNAME VARCHAR(16),
LOG_ID BIGINT(10)
);