How can we get more details about columns of an existing table than return by MySQL SHOW COLUMNS statement?

MySQLMySQLi Database

If we want to get more details about the column of an existing table then we need to use SHOW FULL COLUMNS statement. Consider the example below in which SHOW FULL COLUMNS statement has been applied on ‘Employee’ table and MySQL returns result set with some extra details like Collation, Privileges, and Comment, about the columns of the table −

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)
raja
Published on 19-Feb-2018 19:07:27
Advertisements