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.
show columns from table_name;
上面的 MYSQL 命令,在一个表中显示所有具有数据类型的列名。我只想要没有其他信息的列名。
任何形式的帮助表示赞赏。谢谢。
SELECT column_name FROM information_schema.columns WHERE table_schema = 'db_name' AND table_name = 'your_table'
SQLFiddle 示例