SQL代码
- SELECT COLUMN_NAME 列名, DATA_TYPE 字段类型, COLUMN_COMMENT 字段注释
- FROM INFORMATION_SCHEMA.COLUMNS
- WHERE table_name = 'companies'##表名
- AND table_schema = 'testhuicard'##数据库名
- AND column_name LIKE 'c_name'##字段名
- SELECT table_name 表名,TABLE_COMMENT 表注释 FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'testhuicard' ##数据库名
- AND table_name LIKE 'companies'##表名