programing

mysql 클라이언트의 필드 코멘트는 어떻게 볼 수 있습니까?

codeshow 2023. 10. 19. 22:53
반응형

mysql 클라이언트의 필드 코멘트는 어떻게 볼 수 있습니까?

개별 필드의 코멘트를 보고 싶습니다.일반적으로 매개변수를 "설명"할 때 기대할 수 있는 것입니다.

mysql> describe metrics;
+-------+---------------------+------+-----+---------+----------------+
| Field | Type                | Null | Key | Default | Extra          |
+-------+---------------------+------+-----+---------+----------------+
| id    | int(10) unsigned    | NO   | PRI | NULL    | auto_increment |
| ty    | int(10) unsigned    | NO   |     | NULL    |                |
| t     | bigint(20) unsigned | NO   |     | NULL    |                |
| s     | int(10) unsigned    | NO   |     | 60000   |                |
| e     | int(10) unsigned    | NO   |     | NULL    |                |
| c     | int(10) unsigned    | NO   |     | NULL    |                |
+-------+---------------------+------+-----+---------+----------------+
show full columns from <table_name>

출력은 다음과 같습니다.

| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment

이것이 당신에게 유용하기를 바랍니다.

이 쿼리는 당신에게 더 많은 정보를 줄 것입니다.describe문:

SELECT * 
FROM information_schema.columns 
WHERE table_name = 'metrics'
AND table_schema = '...' -- Optionally, filter the schema as well, to avoid conflicts

항상 다음을 사용할 수 있습니다.

show create table <tablename>

언급URL : https://stackoverflow.com/questions/7835092/how-can-you-see-field-comments-from-mysql-client

반응형