Home > Database > Mysql Tutorial > How can we get more details about existing table columns than the MySQL SHOW COLUMNS statement returns?

How can we get more details about existing table columns than the MySQL SHOW COLUMNS statement returns?

WBOY
Release: 2023-08-31 23:21:05
forward
1368 people have browsed it

我们怎样才能获得比 MySQL SHOW COLUMNS 语句返回的更多有关现有表列的详细信息?

If we want to get more details about the columns of an existing table, then we need to use SHOW FULL COLUMNS statement. Consider the following example where the SHOW FULL COLUMNS statement has been applied to the "Employee" table and MySQL returns a result set with some additional details about the table columns such as collation, permissions, and comments -

mysql> SHOW FULL COLUMNS FROM EMPLOYEE\G
*************************** 1. row ***************************
     Field: Id
      Type: int(11)
 Collation: NULL
      Null: YES
       Key:
   Default: NULL
     Extra:
Privileges: select,insert,update,references
   Comment:
*************************** 2. row ***************************
     Field: Name
      Type: varchar(20)
 Collation: latin1_swedish_ci
      Null: YES
       Key:
   Default: NULL
     Extra:
Privileges: select,insert,update,references
   Comment:

2 rows in set (0.13 sec)
Copy after login

The above is the detailed content of How can we get more details about existing table columns than the MySQL SHOW COLUMNS statement returns?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template