728x90
[교재 SQL 스크립트] 실전_ch1-1-3-departments&employees.sql
USE mydb;
CREATE TABLE departments(
department_id INT,
department_name VARCHAR(30)
);
CREATE TABLE employees(
employee_id INT,
employee_name VARCHAR(20),
salary INT,
department_id INT
);
INSERT INTO departments
VALUES (10, '데이터분석팀');
INSERT INTO departments
VALUES (20, 'DB기술팀');
INSERT INTO departments
VALUES (30, '클라우드팀');
INSERT INTO departments
VALUES (40, 'AI팀');
INSERT INTO departments
VALUES (50, '시스템개발팀');
INSERT INTO employees
VALUES (100, '이익준', 9000, 10);
INSERT INTO employees
VALUES (101, '안정원', 8000, 20);
INSERT INTO employees
VALUES (102, '김준완', 8500, 30);
INSERT INTO employees
VALUES (103, '양석형', 7000, 40);
INSERT INTO employees
VALUES (104, '채송화', 9000, 50);
INSERT INTO employees
VALUES (105, '장겨울', 6000, 10);
INSERT INTO employees
VALUES (106, '종세혁', 7200, 20);
INSERT INTO employees
VALUES (107, '황지우', 6500, 30);
INSERT INTO employees
VALUES (108, '김건', 7500, 40);
INSERT INTO employees
VALUES (109, '최세훈', 6000, 50);
COMMIT;
728x90
'MySQL' 카테고리의 다른 글
내일은 SQL(응용 실전편) 실전_ch1-2-1-member_info.sql (0) | 2024.05.20 |
---|---|
내일은 SQL(응용 실전편) 실전_ch1-1-2-product&payment.sql (0) | 2024.05.20 |
내일은 SQL(응용 실전편) 실전_ch1-1-1-student&winner_list.sql (0) | 2024.05.20 |
(Workbench) SSH 터널링으로 DB서버 접속(pem키가 있을 때) (2) | 2022.03.16 |
Dbeaver에서 로컬DB에 접속 못하는 현상 해결 (0) | 2022.02.11 |