SHOWFULLCOLUMNSFROMEMPLOYEE\G***** ************************1.row**************************** **"/> SHOWFULLCOLUMNSFROMEMPLOYEE\G***** ************************1.row**************************** **">

Home  >  Article  >  Database  >  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
WBOYforward
2023-08-31 23:21:051280browse

我们怎样才能获得比 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)

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!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete