리자

테이블의 컬럼을 상세하게 조회하기 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년 전 조회 1,240
15년 전 조회 1,632
15년 전 조회 3,687
15년 전 조회 1,537
15년 전 조회 2,331
15년 전 조회 1,610
15년 전 조회 1,417
15년 전 조회 3,096
15년 전 조회 2,057
15년 전 조회 2,952
15년 전 조회 3,056
15년 전 조회 1,800
15년 전 조회 1,515
15년 전 조회 2,005
15년 전 조회 1,449
15년 전 조회 1,722
15년 전 조회 1,623
15년 전 조회 2,014
15년 전 조회 2,163
15년 전 조회 1,434
15년 전 조회 1,859
15년 전 조회 1,644
15년 전 조회 1,483
15년 전 조회 1,542
15년 전 조회 1,859
15년 전 조회 1,300
15년 전 조회 1,492
15년 전 조회 3,131
15년 전 조회 1,955
15년 전 조회 1,314
15년 전 조회 1,348
15년 전 조회 1,806
15년 전 조회 1,848
15년 전 조회 2,104
15년 전 조회 1,604
15년 전 조회 1,950
15년 전 조회 1,242
15년 전 조회 1,591
15년 전 조회 1,890
15년 전 조회 3,274
15년 전 조회 1,636
15년 전 조회 1,624
15년 전 조회 1,503
15년 전 조회 1,385
15년 전 조회 1,398
15년 전 조회 3,987
15년 전 조회 3,389
15년 전 조회 2,539
15년 전 조회 2,982
15년 전 조회 2,088
15년 전 조회 1,627
15년 전 조회 1,632
15년 전 조회 2,954
15년 전 조회 1,471
15년 전 조회 2,518
15년 전 조회 1,313
15년 전 조회 2,455
15년 전 조회 1,391
15년 전 조회 3,076
15년 전 조회 1,325
15년 전 조회 1,775
15년 전 조회 1,309
15년 전 조회 3,515
15년 전 조회 1,878
15년 전 조회 1,902
15년 전 조회 1,912
15년 전 조회 1,970
15년 전 조회 1,568
15년 전 조회 2,323
15년 전 조회 1,837
15년 전 조회 1,471
15년 전 조회 3,332
15년 전 조회 1,697
15년 전 조회 1,899
15년 전 조회 1,660
15년 전 조회 2,531
15년 전 조회 2,556
15년 전 조회 2,189
15년 전 조회 1,563
15년 전 조회 1,819
15년 전 조회 1,470
15년 전 조회 1,442
15년 전 조회 1,698
15년 전 조회 3,059
15년 전 조회 3,088
15년 전 조회 2,062
15년 전 조회 1,561
15년 전 조회 1,742
15년 전 조회 1,758
15년 전 조회 1,631
15년 전 조회 1,534
15년 전 조회 1,443
15년 전 조회 1,804
15년 전 조회 1,762
15년 전 조회 1,538
15년 전 조회 1,489
15년 전 조회 1,657
15년 전 조회 2,136
15년 전 조회 1,649
15년 전 조회 1,979