리자

테이블의 컬럼을 상세하게 조회하기 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년 전 조회 807
15년 전 조회 1,209
15년 전 조회 3,219
15년 전 조회 1,083
15년 전 조회 1,892
15년 전 조회 1,151
15년 전 조회 978
15년 전 조회 2,626
15년 전 조회 1,621
15년 전 조회 2,519
15년 전 조회 2,627
15년 전 조회 1,345
15년 전 조회 1,054
15년 전 조회 1,530
15년 전 조회 930
15년 전 조회 1,219
15년 전 조회 1,124
15년 전 조회 1,516
15년 전 조회 1,665
15년 전 조회 926
15년 전 조회 1,342
15년 전 조회 1,132
15년 전 조회 962
15년 전 조회 1,037
15년 전 조회 1,360
15년 전 조회 792
15년 전 조회 976
15년 전 조회 2,626
15년 전 조회 1,442
15년 전 조회 811
15년 전 조회 842
15년 전 조회 1,281
15년 전 조회 1,319
15년 전 조회 1,570
15년 전 조회 1,061
15년 전 조회 1,427
15년 전 조회 723
15년 전 조회 1,065
15년 전 조회 1,326
15년 전 조회 2,736
15년 전 조회 1,103
15년 전 조회 1,082
15년 전 조회 977
15년 전 조회 859
15년 전 조회 868
15년 전 조회 3,460
15년 전 조회 2,829
15년 전 조회 2,006
15년 전 조회 2,453
15년 전 조회 1,541
15년 전 조회 1,089
15년 전 조회 1,090
15년 전 조회 2,369
15년 전 조회 914
15년 전 조회 1,954
15년 전 조회 753
15년 전 조회 1,906
15년 전 조회 838
15년 전 조회 2,512
15년 전 조회 759
15년 전 조회 1,196
15년 전 조회 741
15년 전 조회 2,906
15년 전 조회 1,284
15년 전 조회 1,315
15년 전 조회 1,322
15년 전 조회 1,387
15년 전 조회 992
15년 전 조회 1,753
15년 전 조회 1,285
15년 전 조회 863
15년 전 조회 2,726
15년 전 조회 1,114
15년 전 조회 1,308
15년 전 조회 1,111
15년 전 조회 1,960
15년 전 조회 1,974
15년 전 조회 1,624
15년 전 조회 982
15년 전 조회 1,218
15년 전 조회 914
15년 전 조회 859
15년 전 조회 1,112
15년 전 조회 2,466
15년 전 조회 2,496
15년 전 조회 1,468
15년 전 조회 1,011
15년 전 조회 1,168
15년 전 조회 1,177
15년 전 조회 1,042
15년 전 조회 940
15년 전 조회 868
15년 전 조회 1,231
15년 전 조회 1,181
15년 전 조회 928
15년 전 조회 902
15년 전 조회 1,074
15년 전 조회 1,540
15년 전 조회 1,073
15년 전 조회 1,401