DECLARE
ICount number (2): = 0;
BEGIN
Select count (*) INTO iCount FROM user_sequences u WHERE u. sequence_name = 'seq _ TCAPITALNOTIFY ';
IF iCount = 0
THEN
/* Create sequence */
Execute immediate 'create sequence SEQ_TCAPITALNOTIFY minvalue 1 nomaxvalue start with 1 increment by 1 ';
End if;
Select count (*) INTO iCount FROM user_tables u WHERE u. TABLE_NAME = 'tcapital=y ';
IF iCount = 0
THEN
/* Create a table TCAPITALNOTIFY */
Execute immediate 'create table TCAPITALNOTIFY (
Rochelle serialno number (11) not null primary key,
D_DATE DATE not null,
C_CUSTNO varchar2 (12) not null,
F_BALENCE NUMBER (16, 2 ),
C_FUNDCODE VARCHAR2 (6 ),
D_REPLYPAYTIME DATE,
C_ORGCONTACT VARCHAR2 (2000 ),
C_ORGTEL VARCHAR2 (2000 ),
D_NOTIFICATIONTIME DATE,
C_ISCERTIFICATE CHAR (1 ),
C_REALPAYTIME DATE,
C_MEMO CHAR (1 ),
C_ISCANCEL VARCHAR2 (2000 ),
C_CREATOR VARCHAR2 (16 ),
D_CREATEDATE DATE
) Nologging tablespace crm_htable ';
Execute immediate 'comment on table TCAPITALNOTIFY is ''funding notification table ''';
Execute immediate 'comment on column TCAPITALNOTIFY. L_SERIALNO is ''serial number ''';
Execute immediate 'comment on column TCAPITALNOTIFY. D_DATE is ''dat ''';
Execute immediate 'comment on column TCAPITALNOTIFY. C_CUSTNO is ''account name ''';
Execute immediate 'comment on column TCAPITALNOTIFY. F_BALENCE is ''' purchase funds (RMB )''';
Execute immediate 'comment on column TCAPITALNOTIFY. C_FUNDCODE is ''buy products ''';
Execute immediate 'comment on column TCAPITALNOTIFY. D_REPLYPAYTIME is ''institution reply fund transfer time ''';
Execute immediate 'comment on column TCAPITALNOTIFY. C_ORGCONTACT is ''institution contact ''';
Execute immediate 'comment on column TCAPITALNOTIFY. C_ORGTEL is ''organization contact number ''';
Execute immediate 'comment on column TCAPITALNOTIFY. d_icationicationtime is ''our notification time ''';
Execute immediate 'comment on column TCAPITALNOTIFY. C_ISCERTIFICATE is ''whether to provide the transfer credential ''';
Execute immediate 'comment on column TCAPITALNOTIFY. C_REALPAYTIME is '''actual receipt time of funds ''';
Execute immediate 'comment on column TCAPITALNOTIFY. C_ISCANCEL is ''withdraw ''';
Execute immediate 'comment on column TCAPITALNOTIFY. C_MEMO is ''note ''';
Execute immediate 'comment on column TCAPITALNOTIFY. C_CREATOR is ''' creator ''';
Execute immediate 'comment on column TCAPITALNOTIFY. D_CREATEDATE is ''creation date ''';
End if;
END;
/
For more information about Oracle, see Oracle topics page http://www.bkjia.com/topicnews.aspx? Tid = 12