📄 green.sql
字号:
prompt PL/SQL Developer import file
prompt Created on 2007年3月17日 by jetwong
set feedback off
set define off
prompt Dropping POPEDOM...
drop table POPEDOM cascade constraints;
prompt Dropping USERINFO...
drop table USERINFO cascade constraints;
prompt Dropping OPERATOR...
drop table OPERATOR cascade constraints;
prompt Dropping FORUM...
drop table FORUM cascade constraints;
prompt Dropping BBSUSER...
drop table BBSUSER cascade constraints;
prompt Dropping CONTENT...
drop table CONTENT cascade constraints;
prompt Dropping EQUIPMENTAPPLY...
drop table EQUIPMENTAPPLY cascade constraints;
prompt Dropping GREENSYSPARAM...
drop table GREENSYSPARAM cascade constraints;
prompt Dropping HOLSAPPLY...
drop table HOLSAPPLY cascade constraints;
prompt Dropping LOGIDIO...
drop table LOGIDIO cascade constraints;
prompt Dropping LOGWORK...
drop table LOGWORK cascade constraints;
prompt Dropping MANGLEAPPLY...
drop table MANGLEAPPLY cascade constraints;
prompt Dropping MESSAGE...
drop table MESSAGE cascade constraints;
prompt Dropping TOPIC...
drop table TOPIC cascade constraints;
prompt Dropping REPLYTOPIC...
drop table REPLYTOPIC cascade constraints;
prompt Dropping TRANSACTION...
drop table TRANSACTION cascade constraints;
prompt Dropping USERGROUP...
drop table USERGROUP cascade constraints;
prompt Dropping USER_GROUPLINK...
drop table USER_GROUPLINK cascade constraints;
prompt Creating POPEDOM...
create table POPEDOM
(
POPEDOMID NUMBER(10) not null,
PARENTID NUMBER(10),
IDENTIFIER CHAR(10),
NAME VARCHAR2(30),
DESCRIPTION VARCHAR2(50)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table POPEDOM
add constraint PK15 primary key (POPEDOMID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
prompt Creating USERINFO...
create table USERINFO
(
USERINFOID NUMBER(10) not null,
FIRSTNAME VARCHAR2(10),
LASTNAME VARCHAR2(10),
SEX CHAR(1),
AGE NUMBER(10),
MOBILETEL NUMBER(11),
TELEPHONE NUMBER(12),
ADDRESS VARCHAR2(100),
DUTY VARCHAR2(50),
HOLS NUMBER
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table USERINFO
add constraint PK11 primary key (USERINFOID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
prompt Creating OPERATOR...
create table OPERATOR
(
OPERATORID NUMBER(10) not null,
USERNAME VARCHAR2(20),
PASSWORD VARCHAR2(20),
RGISTERTIME DATE default sysdate,
STOPTIME DATE,
STATE NUMBER(10),
LOGINCOUNT NUMBER default 0,
USERINFOID NUMBER(10) not null,
POPEDOMID NUMBER(10) not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table OPERATOR
add constraint PK10 primary key (OPERATORID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table OPERATOR
add constraint REFPOPEDOM67 foreign key (POPEDOMID)
references POPEDOM (POPEDOMID);
alter table OPERATOR
add constraint REFUSERINFO63 foreign key (USERINFOID)
references USERINFO (USERINFOID);
prompt Creating FORUM...
create table FORUM
(
FORUMID NUMBER(10) not null,
FORUMNAME VARCHAR2(255),
STATE NUMBER(10),
OPERATORID NUMBER(10) not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table FORUM
add constraint PK42 primary key (FORUMID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table FORUM
add constraint REFOPERATOR77 foreign key (OPERATORID)
references OPERATOR (OPERATORID);
prompt Creating BBSUSER...
create table BBSUSER
(
BBSUSERID NUMBER(10) not null,
FORUMID NUMBER(10) not null,
OPERATORID NUMBER(10) not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table BBSUSER
add constraint PK44 primary key (BBSUSERID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table BBSUSER
add constraint REFFORUM79 foreign key (FORUMID)
references FORUM (FORUMID);
alter table BBSUSER
add constraint REFOPERATOR80 foreign key (OPERATORID)
references OPERATOR (OPERATORID);
prompt Creating CONTENT...
create table CONTENT
(
CONTENTID NUMBER(10) not null,
CONTENT VARCHAR2(255),
PREID NUMBER(10)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table CONTENT
add constraint PK50 primary key (CONTENTID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
prompt Creating EQUIPMENTAPPLY...
create table EQUIPMENTAPPLY
(
EQUIPMENTAPPLYID NUMBER(10) not null,
APPLYTIME DATE,
APPLYCAUSE VARCHAR2(1000),
STARTTIME DATE,
ENDTIME DATE,
COUNT NUMBER(10),
APPLYOP NUMBER(10),
REPLYOP NUMBER(10),
EQUIPMENT NUMBER(2),
ISCHECK NUMBER(10),
ISREAD NUMBER(10)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table EQUIPMENTAPPLY
add constraint PK34 primary key (EQUIPMENTAPPLYID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
prompt Creating GREENSYSPARAM...
create table GREENSYSPARAM
(
GREENSYSPARAMID NUMBER(10) not null,
GCODE VARCHAR2(50),
MCODE VARCHAR2(50),
MNAME VARCHAR2(50),
PARAM1 VARCHAR2(40),
PARAM2 VARCHAR2(40),
PARAM3 VARCHAR2(40),
STATE VARCHAR2(255),
NUMS NUMBER(10)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table GREENSYSPARAM
add constraint PK41 primary key (GREENSYSPARAMID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
prompt Creating HOLSAPPLY...
create table HOLSAPPLY
(
HOLSAPPLYID NUMBER(10) not null,
APPLYTIME DATE default sysdate,
TYPE NUMBER,
APPLYCAUSE VARCHAR2(100),
STARTTIME DATE,
ENDTIME DATE,
COUNT NUMBER(10),
APPLYOP NUMBER(10),
REPLYOP NUMBER(10),
ISREAD NUMBER(10),
ISCHECK NUMBER(10),
SFLAG NUMBER(10)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table HOLSAPPLY
add constraint PK24 primary key (HOLSAPPLYID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
prompt Creating LOGIDIO...
create table LOGIDIO
(
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -