1. tStaff table 생성
CREATE TABLE tStaff
(
name char (15) PRIMARY KEY,
depart char (10) NOT NULL,
gender char (3) NOT NULL,
joindate DATE NOT NULL,
grade char (10) NOT NULL,
salary int NOT NULL,
score decimal(5,2) null
)
2. Data 값 생성
INSERT INTO tStaff VALUES ('김유신', '총무부', '남', '2000-2-3','이사', 420,88.8);
INSERT INTO tStaff VALUES ('유관순', '영업부', '여', '2009-3-1','과장', 120,null);
INSERT INTO tStaff VALUES ('안중근', '인사과', '남', '2012-5-5','대리', 256,76.5);
INSERT INTO tStaff VALUES ('윤봉길', '영업부', '남', '2015-5-15','과장', 350,71.25);
INSERT INTO tStaff VALUES ('강감찬', '영업부', '남', '2018-8-9','사원', 320,56.0);
INSERT INTO tStaff VALUES ('정몽주', '총무부', '남', '2010-9-6','대리', 370,89.5);
INSERT INTO tStaff VALUES ('신사임당', '영업부', '여', '2013-6-19','부장', 400,92.8);
INSERT INTO tStaff VALUES ('논개', '인사과', '여', '2010-9-16','대리', 340,46.2);
INSERT INTO tStaff VALUES ('황진이', '총무부', '여', '2012-5-5','사원', 275,52.5);
INSERT INTO tStaff VALUES ('이율곡', '총무부', '남', '2016-3-8','과장', 385,65.4);
INSERT INTO tStaff VALUES ('이사부', '총무부', '남', '2000-2-3','대리', 375,50);
INSERT INTO tStaff VALUES ('안창호', '영업부', '남', '2015-8-15','사원', 275,52.5);
COMMIT ;
SELECT * FROM tStaff;
'SQL > Oracle' 카테고리의 다른 글
오라클 공부 1일차 - 10월06일 (0) | 2021.10.06 |
---|---|
Oracle 18c 설치 (0) | 2021.10.05 |