赞
踩
1.查看表结构:
SELECT column_name,data_type FROM information_schema.columns WHERE table_name='数据库表名';
2.查看表的主键:
SELECT column_name AS 主键 FROM INFORMATION_SCHEMA.`KEY_COLUMN_USAGE` WHERE table_name='数据库表名' AND constraint_name='PRIMARY'
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。