OlegON: |
Следующие ветки без нормальной темы буду стирать |
-- Create table create table SASPIRITCODE ( ID NUMBER(10) not null, CODE VARCHAR2(20) not null, TITLE VARCHAR2(255) not null ) tablespace USERS pctfree 10 initrans 1 maxtrans 255 storage ( initial 64K next 1M minextents 1 maxextents unlimited ); -- Create/Recreate primary, unique and foreign key constraints alter table SASPIRITCODE add constraint SACSPIRITCODE_PK primary key (ID) using index tablespace INDEX_OPERS pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K next 1M minextents 1 maxextents unlimited ); alter table SASPIRITCODE add constraint SACSPIRITCODE_CODE unique (CODE) using index tablespace INDEX_OPERS pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K next 1M minextents 1 maxextents unlimited ); alter table SASPIRITCODE add constraint SACSPIRITCODE_TITLE unique (TITLE) using index tablespace INDEX_OPERS pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K next 1M minextents 1 maxextents unlimited ); -- Create/Recreate check constraints alter table SASPIRITCODE add constraint SACSPIRITCODE_ID check (ID >= 0); -- Grant/Revoke object privileges grant insert, update, delete on SASPIRITCODE to SUPERMAG_FN_EDITSPIRITCODE; grant select on SASPIRITCODE to SUPERMAG_USER;