Chart_date chart_field chart_counts
20131115 user_jrFeed_item_count , {"1":2}
20131115 user_jrForum_item_count, {"1":1}
20131115 user_jrFeed_item_count,user_jrForum_item_count, {"1":1,"1":2}
"user_jrFeed_item_count, user_jrForum_item_count"텍스트를 mysql에서 "song_file_stream_count"와 같은 이름으로 어떻게 바꿀 수 있습니까?mysql의 테이블 데이터 필드 이름 바꾸기
필드는 : 20131115 user_jrFeed_item_count,user_jrForum_item_count, {"1":1,"1":2}
이 기능 당신은 자동 증분 역할과 기본 키 고려해야 할 다른 열 (SrNo)를 추가 할 필요가
INSERT INTO table1 (Chart_date, chart_field, chart_counts)
SELECT Chart_date, GROUP_CONCAT(chart_field) as chart_field,
REPLACE(GROUP_CONCAT(chart_counts),'},{',',') as chart_counts
FROM table1
GROUP BY Chart_date
잘 작동합니다 .... 간단하고 쉬운 솔루션 – user3011222