prompt PL/SQL Developer import file
prompt Created on 2016年10月25日 by Administrator
set feedback off
set define off
prompt Dropping ADVERT_TYPE...
drop table ADVERT_TYPE cascade constraints;
prompt Dropping ADVERT...
drop table ADVERT cascade constraints;
prompt Dropping A_MEMBER...
drop table A_MEMBER cascade constraints;
prompt Dropping ADVICE...
drop table ADVICE cascade constraints;
prompt Dropping A_MENU...
drop table A_MENU cascade constraints;
prompt Dropping A_ELEMENT...
drop table A_ELEMENT cascade constraints;
prompt Dropping A_USER...
drop table A_USER cascade constraints;
prompt Dropping A_LOGIN_RECORD...
drop table A_LOGIN_RECORD cascade constraints;
prompt Dropping A_LOGON...
drop table A_LOGON cascade constraints;
prompt Dropping A_MEMBER_ADDRESS...
drop table A_MEMBER_ADDRESS cascade constraints;
prompt Dropping A_MEMBER_GRADE...
drop table A_MEMBER_GRADE cascade constraints;
prompt Dropping A_MEMBER_PAYWAY...
drop table A_MEMBER_PAYWAY cascade constraints;
prompt Dropping A_MEMBER_RECORD...
drop table A_MEMBER_RECORD cascade constraints;
prompt Dropping A_PIC_TYPE...
drop table A_PIC_TYPE cascade constraints;
prompt Dropping A_PRIVILEGE...
drop table A_PRIVILEGE cascade constraints;
prompt Dropping A_ROLE...
drop table A_ROLE cascade constraints;
prompt Dropping A_USER_ROLE...
drop table A_USER_ROLE cascade constraints;
prompt Dropping BRAND...
drop table BRAND cascade constraints;
prompt Dropping MESSAGE...
drop table MESSAGE cascade constraints;
prompt Dropping PRODUCT_TYPE...
drop table PRODUCT_TYPE cascade constraints;
prompt Dropping PRODUCT...
drop table PRODUCT cascade constraints;
prompt Dropping PICTURE...
drop table PICTURE cascade constraints;
prompt Dropping TB_E_COMPANY...
drop table TB_E_COMPANY cascade constraints;
prompt Dropping TB_ORDER...
drop table TB_ORDER cascade constraints;
prompt Dropping TB_EXPRESS...
drop table TB_EXPRESS cascade constraints;
prompt Dropping TB_ORDER_DESCRIBE...
drop table TB_ORDER_DESCRIBE cascade constraints;
prompt Creating ADVERT_TYPE...
create table ADVERT_TYPE
(
type_id NUMBER not null,
type_name VARCHAR2(50),
describe VARCHAR2(200),
create_user VARCHAR2(20),
create_date DATE,
update_user VARCHAR2(20),
update_date DATE,
ad_num NUMBER
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
alter table ADVERT_TYPE
add constraint TYPE_PK_ID primary key (TYPE_ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
prompt Creating ADVERT...
create table ADVERT
(
ad_id NUMBER not null,
ad_name VARCHAR2(50) not null,
type_id NUMBER,
attachment VARCHAR2(50),
width VARCHAR2(20),
height VARCHAR2(20),
href VARCHAR2(50),
state CHAR(1) default 0 not null,
create_user VARCHAR2(20),
create_date DATE,
update_user VARCHAR2(20),
update_date DATE
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
alter table ADVERT
add constraint AD_PK_ID primary key (AD_ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
alter table ADVERT
add constraint AD_FK_TYPE foreign key (TYPE_ID)
references ADVERT_TYPE (TYPE_ID);
prompt Creating A_MEMBER...
create table A_MEMBER
(
member_id NUMBER(10) not null,
member_name VARCHAR2(20) not null,
member_pwd VARCHAR2(16) default '888888' not null,
member_realname VARCHAR2(20),
member_sex CHAR(1),
member_mobile_phone VARCHAR2(13),
member_phone VARCHAR2(12),
member_email VARCHAR2(50),
member_address VARCHAR2(50),
member_word VARCHAR2(50),
member_add_time DATE,
member_state CHAR(1) default '1' not null,
member_update_time DATE,
member_update_man VARCHAR2(20),
member_add_man VARCHAR2(20)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
alter table A_MEMBER
add constraint PK_A_MEMBER primary key (MEMBER_ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
prompt Creating ADVICE...
create table ADVICE
(
advice_id NUMBER(9) not null,
member_id NUMBER(10),
advice_content VARCHAR2(500),
create_date DATE,
advice_state CHAR(1) default '1',
advice_type VARCHAR2(10)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table ADVICE
add constraint PK_ADVICE primary key (ADVICE_ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table ADVICE
add constraint FK_ADVICE_MEMBER_ID foreign key (MEMBER_ID)
references A_MEMBER (MEMBER_ID);
prompt Creating A_MENU...
create table A_MENU
(
m_no NUMBER(10) not null,
m_name VARCHAR2(100) not null,
m_url VARCHAR2(200) not null,
p_no NUMBER(10),
p_name VARCHAR2(100),
m_state CHAR(1) default '1',
create_user NUMBER(10),
create_date DATE,
update_user NUMBER(10),
update_date DATE
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
alter table A_MENU
add constraint PK_A_MENU primary key (M_NO)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
prompt Creating A_ELEMENT...
create table A_ELEMENT
(
e_no NUMBER(10) not null,
m_no NUMBER(10),
e_name VARCHAR2(100) not null,
e_url VARCHAR2(200),
e_state CHAR(1) default '1',
create_user NUMBER(10),
create_date DATE,
update_user NUMBER(10),
update_date DATE
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255;
alter table A_ELEMENT
add constraint PK_A_ELEMENT primary key (E_NO)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255;
alter table A_ELEMENT
add constraint FK_A_ELEMEN_REFERENCE_A_MENU foreign key (M_NO)
references A_MENU (M_NO);
prompt Creating A_USER...
create table A_USER
(
user_id NUMBER(10) not null,
user_name VARCHAR2(100) not null,
password VARCHAR2(50) not null,
telephone VARCHAR2(15) not null,
sex CHAR(1),
age NUMBER(3),
email VARCHAR2(50) not null,
qq VARCHAR2(20),
remark VARCHAR2(200),
create_user NUMBER(10),
create_date DATE,
update_user NUMBER(10),
update_date DATE,
state CHAR(1) default '1' not null
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
alter table A_USER
add constraint PK_A_USER primary key (USER_ID)
using index
tablespace USERS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
prompt Creating A_LOGIN_RECORD...
create table A_LOGIN_RECORD
(
l_id NUMBER(10) not null,
user_id NUMBER(10),
user_name VARCHAR2(100),
l_content VARCHAR2(100),
l_loc