Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的任务是列出数据类型为 tiny int 的列名。我使用了 SHOW COLUMNS 但我想使用结果根据显示列结果在我的表单中创建一个字段。
试试这个:
SELECT COLUMN_NAME FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'dbName' AND TABLE_NAME = 'tableName' AND LOWER(DATA_TYPE) = 'tinyint'