-- EMP TABLE
CREATE TABLE EMP(
EMP_ID NUMBER PRIMARY KEY,
EMP_NAME VARCHAR2(21) NOT NULL,
SALARY NUMBER NOT NULL CHECK(SALARY >= 0),
HIRE_DATE DATE DEFAULT SYSDATE NOT NULL,
PHONE_NUMBER VARCHAR2(11) NOT NULL,
EMAIL VARCHAR2(50),
POSITION VARCHAR2(30) NOT NULL,
DEPT VARCHAR2(30) NOT NULL
);

-- EMP SEQUENCE
CREATE SEQUENCE EMP_SEQ NOCACHE;

-- INSERT SAMPLE DATA
INSERT INTO EMP VALUES(EMP_SEQ.NEXTVAL, '테스트1', 1000000, TO_DATE('2020-01-01', 'YYYY-MM-DD'),'01011112222','test1@test.com','인턴','개발');
INSERT INTO EMP VALUES(EMP_SEQ.NEXTVAL, '테스트2', 1100000, TO_DATE('2020-02-02', 'YYYY-MM-DD'),'01022223333','test2@test.com','사원','개발');
INSERT INTO EMP VALUES(EMP_SEQ.NEXTVAL, '테스트3', 1200000, TO_DATE('2020-03-03', 'YYYY-MM-DD'),'01033334444','test3@test.com','사원','기획');
INSERT INTO EMP VALUES(EMP_SEQ.NEXTVAL, '테스트4', 1300000, TO_DATE('2020-04-04', 'YYYY-MM-DD'),'01044445555','test4@test.com','대리','개발');
INSERT INTO EMP VALUES(EMP_SEQ.NEXTVAL, '테스트5', 1400000, TO_DATE('2020-05-05', 'YYYY-MM-DD'),'01055556666','test5@test.com','대리','영업');
INSERT INTO EMP VALUES(EMP_SEQ.NEXTVAL, '테스트6', 1500000, TO_DATE('2020-06-06', 'YYYY-MM-DD'),'01066667777','test6@test.com','과장','개발');
INSERT INTO EMP VALUES(EMP_SEQ.NEXTVAL, '테스트7', 1600000, TO_DATE('2020-07-07', 'YYYY-MM-DD'),'01077778888','test7@test.com','차장','기획');
INSERT INTO EMP VALUES(EMP_SEQ.NEXTVAL, '테스트8', 1700000, TO_DATE('2020-08-08', 'YYYY-MM-DD'),'01088889999','test8@test.com','부장','기획');
INSERT INTO EMP VALUES(EMP_SEQ.NEXTVAL, '테스트9', 1800000, TO_DATE('2020-09-09', 'YYYY-MM-DD'),'01099990000','test9@test.com','이사','영업');
INSERT INTO EMP VALUES(EMP_SEQ.NEXTVAL, '테스트10', 2500000, TO_DATE('2020-10-10', 'YYYY-MM-DD'),'01000001111','test10@test.com','사장','경영');
COMMIT;    