CREATETABLEACCOUNT(IDNUMBER(9)CONSTRAINTACCOUNT_ID_PKPRIMARYKEY,RECOMMENDER_IDNUMBER(9)CONSTRAINTACCOUNT_RECOMMENDER_ID_FKREFERENCESACCOUNT(ID),LOGIN_NAMEVARCHAR2(30)NOTN...
CREATE TABLE ACCOUNT(
ID NUMBER(9) CONSTRAINT ACCOUNT_ID_PK PRIMARY KEY,
RECOMMENDER_ID NUMBER(9) CONSTRAINT ACCOUNT_RECOMMENDER_ID_FK
REFERENCES ACCOUNT(ID),
LOGIN_NAME VARCHAR2(30) NOT NULL
CONSTRAINT ACCOUNT_LOGIN_NAME_UK UNIQUE,
LOGIN_PASSWD VARCHAR2(30) NOT NULL,
STATUS CHAR(1) CONSTRAINT ACCOUNT_STATUS_CK
CHECK (STATUS IN (0,1,2)),
CREATE_DATE DATE DEFAULT SYSDATE,
PAUSE_DATE DATE,
CLOSE_DATE DATE,
REAL_NAME VARCHAR2(20) NOT NULL,
IDCARD_NO CHAR(18) NOT NULL
CONSTRAINT ACCOUNT_INCARD_NO UNIQUE,
BIRTHDATE DATE,
GENDER CHAR(1) CONSTRAINT ACCOUNT_GENDER_CK
CHECK (GENDER IN (0,1)),
OCCUPATION VARCHAR2(50),
TELEPHONE VARCHAR2(15) NOT NULL,
EMAIL VARCHAR2(50),
MAILADDRESS VARCHAR2(50),
ZIPCODE CHAR(6),
QQ VARCHAR2(15),
LAST_LOGIN_TIME DATE,
LAST_LOGIN_IP VARCHAR2(15)
);
功能要一样,求大神帮忙
展开