mysql导出数据库表名与字段信息
一、导出数据库表格信息
#mysql导出库的表格信息 SELECT A.TABLE_SCHEMA, A.TABLE_NAME, A.TABLE_ROWS, A.CREATE_TIME, A.TABLE_COMMENT FROM INFORMATION_SCHEMA.TABLES A WHERE A.TABLE_SCHEMA = 'sqlstudy'
二、导出数据库字段信息
##mysql导出表格字段信息 SELECT A.TABLE_SCHEMA, A.TABLE_NAME, A.COLUMN_NAME, A.ORDINAL_POSITION, A.DATA_TYPE, A.COLUMN_TYPE, A.COLUMN_COMMENT FROM INFORMATION_SCHEMA.COLUMNS A WHERE A.TABLE_SCHEMA='sqlstudy' ORDER BY A.TABLE_SCHEMA,A.TABLE_NAME,A.ORDINAL_POSITION