日期:2014-05-17 浏览次数:20933 次
--DROP TABLE STUDENT;
CREATE TABLE STUDENT(
STUDENT_ID VARCHAR2(40) PRIMARY KEY,
STUDENT_NAME VARCHAR2(40),
STUDENT_AGE VARCHAR2(3),
STUDENT_SEX VARCHAR2(8),
STUDENT_DEP VARCHAR(40),
STUDENT_PHONE VARCHAR2(40),
STUDENT_NOTES VARCHAR2(200)
)
PARTITION BY LIST(STUDENT_ID )
(
PARTITION PART20091314001 VALUES ('20091314001')
);
--ADD COMMENTS ON TABLE
COMMENT ON TABLE STUDENT IS '学生信息表';
--ADD COMMNETS ON COLUMN
COMMENT ON COLUMN STUDENT.STUDENT_ID IS '学号';
COMMENT ON COLUMN STUDENT.STUDENT_NAME IS '姓名';
COMMENT ON COLUMN STUDENT.STUDENT_AGE IS '年龄';
COMMENT ON COLUMN STUDENT.STUDENT_SEX IS '性别';
COMMENT ON COLUMN STUDENT.STUDENT_DEP IS '专业';
COMMENT ON COLUMN STUDENT.STUDENT_PHONE IS '联系方式';
COMMENT ON COLUMN STUDENT.STUDENT_NOTES IS '备注';
CREATE OR REPLACE PROCEDURE P_STUDENT(V_ACCT_DAY VARCHAR2,
V_RETCODE OUT VARCHAR2,
V_RETINFO OUT VARCHAR2) IS
BEGIN
INSERT INTO STUDENT
VALUES ('20091314001','安妮儿','23','女','大气科学系','15077886350','优秀毕业生');
/* SELECT * FROM STUDENT;*/
COMMIT;
V_RETCODE='SUCCEED';
V_RETINFO='NORMAL';
EXCEPTION
WHEN OTHERS
V_RETCODE='FAIL';
V_RETINFO=SQLERRM;
END;