리자

테이블의 컬럼을 상세하게 조회하기 show full columns from table;

show full columns from table;

mysql 5.x 에서는 Collation (charset) 이 나온다 필드별로...

mysql> show full columns from g4_member;
+-------------------+--------------+-----------------+------+-----+---------------------+----------------+---------------------------------+---------+
| Field             | Type         | Collation       | Null | Key | Default             | Extra          | Privileges                      | Comment |
+-------------------+--------------+-----------------+------+-----+---------------------+----------------+---------------------------------+---------+
| mb_no             | int(11)      | NULL            |      | PRI | NULL                | auto_increment | select,insert,update,references |         |
| mb_id             | varchar(255) | utf8_general_ci |      | UNI |                     |                | select,insert,update,references |         |
| mb_password       | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_name           | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_nick           | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_nick_date      | date         | NULL            |      |     | 0000-00-00          |                | select,insert,update,references |         |
| mb_email          | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_homepage       | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_password_q     | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_password_a     | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_level          | tinyint(4)   | NULL            |      |     | 0                   |                | select,insert,update,references |         |
| mb_jumin          | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_sex            | char(1)      | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_birth          | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_tel            | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_hp             | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_zip1           | varchar(3)   | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_zip2           | varchar(3)   | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_addr1          | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_addr2          | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_signature      | text         | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_recommend      | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_point          | int(11)      | NULL            |      |     | 0                   |                | select,insert,update,references |         |
| mb_today_login    | datetime     | NULL            |      | MUL | 0000-00-00 00:00:00 |                | select,insert,update,references |         |
| mb_login_ip       | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_datetime       | datetime     | NULL            |      | MUL | 0000-00-00 00:00:00 |                | select,insert,update,references |         |
| mb_ip             | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_leave_date     | varchar(8)   | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_intercept_date | varchar(8)   | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_email_certify  | datetime     | NULL            |      |     | 0000-00-00 00:00:00 |                | select,insert,update,references |         |
| mb_memo           | text         | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_mailling       | tinyint(4)   | NULL            |      |     | 0                   |                | select,insert,update,references |         |
| mb_sms            | tinyint(4)   | NULL            |      |     | 0                   |                | select,insert,update,references |         |
| mb_open           | tinyint(4)   | NULL            |      |     | 0                   |                | select,insert,update,references |         |
| mb_open_date      | date         | NULL            |      |     | 0000-00-00          |                | select,insert,update,references |         |
| mb_profile        | text         | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_memo_call      | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_1              | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_2              | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_3              | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_4              | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_5              | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_6              | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_7              | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_8              | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_9              | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
| mb_10             | varchar(255) | utf8_general_ci |      |     |                     |                | select,insert,update,references |         |
+-------------------+--------------+-----------------+------+-----+---------------------+----------------+---------------------------------+---------+
47 rows in set (0.00 sec)

mysql>

[이 게시물은 관리자님에 의해 2011-10-31 17:27:00 MySQL에서 이동 됨]
|

댓글 1개

혹시 이거를

$result= sql_query("show full columns from g4_member");

while(($rows = mysql_fetch_array($result)) == true){

eco $rows['field'].'<br>';
}

가능할까요??? ㅋㅋ;;;

작업하고 나서 디비스키마 달래거나, 디비구조도 달래면 항상 엑셀로 작업하는데 하루죙일 걸리는데,

이거는 디비구조도 나타낼때 좋겠네요.
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
15년 전 조회 878
15년 전 조회 1,282
15년 전 조회 3,307
15년 전 조회 1,167
15년 전 조회 1,972
15년 전 조회 1,226
15년 전 조회 1,051
15년 전 조회 2,715
15년 전 조회 1,706
15년 전 조회 2,607
15년 전 조회 2,726
15년 전 조회 1,433
15년 전 조회 1,153
15년 전 조회 1,603
15년 전 조회 1,016
15년 전 조회 1,308
15년 전 조회 1,201
15년 전 조회 1,611
15년 전 조회 1,750
15년 전 조회 1,011
15년 전 조회 1,432
15년 전 조회 1,227
15년 전 조회 1,050
15년 전 조회 1,119
15년 전 조회 1,446
15년 전 조회 877
15년 전 조회 1,071
15년 전 조회 2,701
15년 전 조회 1,525
15년 전 조회 900
15년 전 조회 922
15년 전 조회 1,371
15년 전 조회 1,395
15년 전 조회 1,664
15년 전 조회 1,149
15년 전 조회 1,524
15년 전 조회 807
15년 전 조회 1,151
15년 전 조회 1,419
15년 전 조회 2,814
15년 전 조회 1,193
15년 전 조회 1,167
15년 전 조회 1,059
15년 전 조회 943
15년 전 조회 947
15년 전 조회 3,548
15년 전 조회 2,919
15년 전 조회 2,098
15년 전 조회 2,538
15년 전 조회 1,627
15년 전 조회 1,183
15년 전 조회 1,181
15년 전 조회 2,457
15년 전 조회 996
15년 전 조회 2,040
15년 전 조회 846
15년 전 조회 1,994
15년 전 조회 931
15년 전 조회 2,601
15년 전 조회 847
15년 전 조회 1,279
15년 전 조회 826
15년 전 조회 3,003
15년 전 조회 1,390
15년 전 조회 1,400
15년 전 조회 1,414
15년 전 조회 1,481
15년 전 조회 1,077
15년 전 조회 1,845
15년 전 조회 1,372
15년 전 조회 951
15년 전 조회 2,833
15년 전 조회 1,205
15년 전 조회 1,406
15년 전 조회 1,198
15년 전 조회 2,049
15년 전 조회 2,065
15년 전 조회 1,712
15년 전 조회 1,071
15년 전 조회 1,313
15년 전 조회 1,007
15년 전 조회 949
15년 전 조회 1,206
15년 전 조회 2,562
15년 전 조회 2,586
15년 전 조회 1,564
15년 전 조회 1,098
15년 전 조회 1,260
15년 전 조회 1,265
15년 전 조회 1,134
15년 전 조회 1,027
15년 전 조회 968
15년 전 조회 1,320
15년 전 조회 1,276
15년 전 조회 1,026
15년 전 조회 990
15년 전 조회 1,167
15년 전 조회 1,638
15년 전 조회 1,168
15년 전 조회 1,494