336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

1 테이블 검색.


select * from INFORMATION_SCHEMA.tables 

where table_schema='계정명';

 → show tables;


2. 컬럼 검색.

select * from INFORMATION_SCHEMA.columns 

where table_schema='계정명' 

and table_name='테이블명' 

order by ordinal_position;

 →  show full columns from 테이블명;


3. 컬럼명 한줄로 합치기.

select GROUP_CONCAT(column_name, ' ') from INFORMATION_SCHEMA.columns 

where table_schema='계정명' 

and table_name='테이블명' 


만약 GROUP_CONCAT size 문제로 데이터가 잘릴 경우

  3.1. GROUP_CONCAT size 조회.

  show variables like 'group_concat_max_len';


  3.2. GROUP_CONCAT size 설정.

  SET @@group_concat_max_len = 2048 ; 



'IT > MySQL' 카테고리의 다른 글

MyISAM, InnoDB 비교  (0) 2018.01.30
MySQL Object(Stored Procedure, Function) 실행시 접근 문제  (0) 2018.01.17
Mysql db_helper  (0) 2017.01.31
MySQL 내장 함수. 숫자 함수, 문자 함수.  (0) 2017.01.20
Mysql 세자리 콤마 찍기.  (0) 2016.11.16
Posted by 당양부부34

블로그 이미지
주요 토렌트를 블로깅하고 있습니다. 토렌트 순위 등은 다른 사이트를 찾아보세요. 주요 웹툰 순위도 게재했어요 경제를 좋아하는 일산의 행복한 프로그래머입니다.
당양부부34
Yesterday
Today
Total

달력

 « |  » 2024.4
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함