长风破浪会有时
直挂云帆济沧海

mysql查询字段名称,字段类型等

SELECT DATA_TYPE,COLUMN_NAME,COLUMN_COMMENT FROM INFORMATION_SCHEMA.Columns WHERE table_name=’表名’ and table_schema=’数据库名’

SELECT COLUMN_NAME as ‘列名’,COLUMN_COMMENT,DATA_TYPE as ‘字段类型’ ,COLUMN_TYPE as ‘长度加类型’ FROM information_schema.COLUMNS where TABLE_NAME like ‘表名’

SELECT column_name,is_nullable,data_type,COLUMN_COMMENT,DATA_TYPE,COLUMN_TYPE FROM information_schema.COLUMNS where TABLE_NAME like ‘%xxx%’

赞(2) 打赏
未经允许不得转载:阿锋哥前端开发经验分享 » mysql查询字段名称,字段类型等
分享到: 更多 (0)

几百块就能做营销型企业网站?

查看详情

可怜可怜作者吧

支付宝扫一扫打赏

微信扫一扫打赏