1.mysql查询表的所有字段

select COLUMN_NAME,column_comment from INFORMATION_SCHEMA.Columns where table_name='表名' and table_schema='数据库名';

 

2.mysql拼接所有字段,方便写sql

select group_concat( COLUMN_NAME separator ', ')  from INFORMATION_SCHEMA.Columns where table_name='表名' and table_schema='数据库名';

相关文章:

  • 2021-11-23
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-24
  • 2022-01-14
猜你喜欢
  • 2022-12-23
  • 2021-11-23
  • 2021-08-08
  • 2021-11-23
  • 2022-12-23
  • 2021-12-02
  • 2021-11-23
相关资源
相似解决方案