mingg IT

[DataSet] 컬럼 20개 DataSet 만들기 본문

카테고리 없음

[DataSet] 컬럼 20개 DataSet 만들기

mingg123 2021. 10. 21. 11:21

컬럼수가 많은 데이터셋을 만들어야 할 일이 생겼다.

 

table을 만든다.

create table manycol(
col0 varchar(20),
col1 varchar(20),
col2 varchar(20),
col3 varchar(20),
col4 varchar(20),
col5 varchar(20),
col6 varchar(20),
col7 varchar(20),
col8 varchar(20),
col9 varchar(20),
col10 varchar(20),
col11 varchar(20),
col12 varchar(20),
col13 varchar(20),
col14 varchar(20),
col15 varchar(20),
col16 varchar(20),
col17 varchar(20),
col18 varchar(20),
col19 varchar(20),
col20 varchar(20)
)

 

각 데이터를 추가한다.

INSERT INTO manycol values('1', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '16', '17','18','19','20','21', '22')
INSERT INTO manycol values('2', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '16', '17','18','19','20','21', '22')
INSERT INTO manycol values('3', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '16', '17','18','19','20','21', '22');
INSERT INTO manycol values('4', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '16', '17','18','19','20','21', '22');
INSERT INTO manycol values('5', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '16', '17','18','19','20','21', '22');
INSERT INTO manycol values('6', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '16', '17','18','19','20','21', '22');
INSERT INTO manycol values('7', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '16', '17','18','19','20','21', '22');
INSERT INTO manycol values('8', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '16', '17','18','19','20','21', '22');
INSERT INTO manycol values('9', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '16', '17','18','19','20','21', '22');
INSERT INTO manycol values('10', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '16', '17','18','19','20','21', '22');
INSERT INTO manycol values('11', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '16', '17','18','19','20','21', '22');
INSERT INTO manycol values('12', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '16', '17','18','19','20','21', '22');
INSERT INTO manycol values('13', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '16', '17','18','19','20','21', '22');
INSERT INTO manycol values('14', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '16', '17','18','19','20','21', '22');
INSERT INTO manycol values('15', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '13', '14', '15', '16', '17','18','19','20','21', '22');

 

성공함을 알 수 있다.

Comments