日期:2014-05-17 浏览次数:20788 次
CREATE TABLE T75 ( ID VARCHAR2(12), DeptName VARCHAR2(20) ); CREATE SEQUENCE SeqT75 START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 4444 ORDER; INSERT INTO T75 SELECT to_char(SYSDATE, 'YYMMDD') || LPAD(to_char(SeqT75.NextVal), 12 - 6, '0'), '市场部' FROM dual; INSERT INTO T75 SELECT to_char(SYSDATE, 'YYMMDD') || LPAD(to_char(SeqT75.NextVal), 12 - 6, '0'), '销售部' FROM dual; INSERT INTO T75 SELECT to_char(SYSDATE, 'YYMMDD') || LPAD(to_char(SeqT75.NextVal), 12 - 6, '0'), '公关部' FROM dual;