【问题标题】:list all columns in table using SQL [duplicate]使用 SQL 列出表中的所有列 [重复]
【发布时间】:2021-06-21 22:08:28
【问题描述】:

如何使用 SQL 查询列出所有列?

【问题讨论】:

  • 这不是博客

标签: sql sql-server


【解决方案1】:
select column_name, data_type, character_maximum_length
    from INFORMATION_SCHEMA.COLUMNS 
    where table_name = '**table_name**';

【讨论】:

  • 您可能想解释一下代码的作用。仅代码的答案对未来的读者很少有用。
猜你喜欢
  • 2017-12-07
  • 2021-05-25
  • 1970-01-01
  • 2013-02-15
  • 1970-01-01
  • 2023-01-18
  • 1970-01-01
  • 2010-12-02
  • 2016-12-08
相关资源
最近更新 更多