





CREATE TABLE hr.hr_number
(
SELECT
PRI_KEY, COL1, COl2....
FROM Source_Table
);
CREATE TABLE hr.hr_cate
(
EmployeeNumber int(11)
, Attrition VARBINARY(50)
, BusinessTravel VARBINARY(50)
, Department VARBINARY(50)
, EducationField VARBINARY(50)
, Gender VARBINARY(50)
, JobRole VARBINARY(50)
, MaritalStatus VARBINARY(50)
, OverTime VARBINARY(50)
);

INSERT INTO hr.hr_cate
(
SELECT
EmployeeNumber
, Attrition
, BusinessTravel
, Department
, EducationField
, Gender
, JobRole
, MaritalStatus
, OverTime
FROM hr.hr_employee_attrition hea
);


원천 테이블 컬럼명 복사하기
SELECT *
FROM hr.hr_employee_attrition hea
결과 테이블 좌측 상단 우클릭 → Advanced Copy → 컬럼명 복사 선택


다음과 같이 설정 후 확인

SELECT
Age, Attrition, BusinessTravel,
DailyRate, Department, DistanceFromHome,
Education, EducationField, EmployeeCount,
EmployeeNumber, EnvironmentSatisfaction,
Gender, HourlyRate, JobInvolvement,
JobLevel, JobRole, JobSatisfaction,
MaritalStatus, MonthlyIncome, MonthlyRate,
NumCompaniesWorked, Over18, OverTime,
PercentSalaryHike, PerformanceRating,
RelationshipSatisfaction, StandardHours,
StockOptionLevel, TotalWorkingYears,
TrainingTimesLastYear, WorkLifeBalance,
YearsAtCompany, YearsInCurrentRole,
YearsSinceLastPromotion, YearsWithCurrManager
FROM hr.hr_employee_attrition hea
hr_cate와 겹치는 컬럼 제외하고 CREATE TABLE 생성
CREATE TABLE hr.hr_number
(
SELECT
EmployeeNumber,
Age, DailyRate, DistanceFromHome,
Education, EmployeeCount, EnvironmentSatisfaction,
HourlyRate, JobInvolvement, JobLevel, JobSatisfaction,
MonthlyIncome, MonthlyRate, NumCompaniesWorked,
PercentSalaryHike, PerformanceRating, RelationshipSatisfaction,
StandardHours, StockOptionLevel, TotalWorkingYears,
TrainingTimesLastYear, WorkLifeBalance, YearsAtCompany,
YearsInCurrentRole, YearsSinceLastPromotion, YearsWithCurrManager
FROM hr.hr_employee_attrition hea
);







| Type | Storage(bytes) | Minimum Value Signed | Maxmum Value Signed |
|---|---|---|---|
| TINYINT | 1 | (-128) | (127) |
| SMALLINT | 2 | (-32768) | (32767) |
| MEDIUMINT | 3 | (-8388608) | (8388607) |
| INT | 4 | (-2147483648) | (2147483647) |
| BIGINT | 8 |
| Type | Storage(bytes) | 연산속도 | 소수점 타입 |
|---|---|---|---|
| FLOAT | 4 | 하 | 부동소수점 |
| BOUBLE | 88 | 중 | 부동소수점 |
| DECIMAL | 16 | 상 | 고정소수점 |
| Value | CHAR(4) | Storage Required | VARCHAR(4) | Storage Required |
|---|---|---|---|---|
| ‘’ | ‘_ _ _ _‘ | 4 bytes | ‘‘ | 1 bytes |
| ‘ab’ | ‘ab_ _’ | 4 bytes | ‘ab’ | 3 bytes |
| ‘abcd’ | ‘abcd’ | 4 bytes | ‘abcd’ | 5 bytes |
| ‘abcdefgh’ | ‘abcd’ | 4 bytes | ‘abcd’ | 5 bytes |
Windows : 구분 X
Linux : 구분 O
MySQL 설정값 확인
SHOW variables LIKE 'lower%'

