By SQL statements to query table structure

The SELECT 
COLUMN_NAME field name, 
COLUMN_TYPE data type, 
the IF (= IS_NULLABLE 'NO', 'a', 'no') the AS 'mandatory', 
COLUMN_COMMENT Note 
the FROM 
INFORMATION_SCHEMA.COLUMNS 
WHERE 
TABLE_SCHEMA = 'Finance' 
the AND 
table_name = 'User'


 In addition to the above examples of what other field support to export it? Referring specifically to mysql official documentation:

https://dev.mysql.com/doc/refman/8.0/en/columns-table.html

 

 

 

 

Original: https://www.cnblogs.com/xianxiaobo/p/10254737.html

Guess you like

Origin www.cnblogs.com/xguai/p/11815510.html