mysql 행 열 바꾸기
페이지 정보
작성자 미친새 작성일 20-02-21 18:59 조회 22,564 댓글 0본문
select type, group_concat(name separator '|') from test group by type ;
SELECT
case when note='cat1' then value end as 'cat1',
case when note='cat2' then value end as 'cat2',
case when note='cat3' then value end as 'cat3'
FROM sandbox;
SELECT
case when note='cat1' then value end as 'cat1',
case when note='cat2' then value end as 'cat2',
case when note='cat3' then value end as 'cat3'
FROM sandbox;
관련링크
- https://fruitdev.tistory.com/16 7460회 연결
- https://lightblog.tistory.com/154 6509회 연결
댓글목록 0
등록된 댓글이 없습니다.