转载自https://www.cnblogs.com/lqw4/p/4831463.html
show columns FROM tablename;
select COLUMN_NAME FROM information_schema.COLUMNS WHERE TABLE_NAME='tablename';
详情请见转载链接