select COLUMN_NAME from information_schema.columns where table_name='your tablename' show columns from tablename