What is the SQL command to return the field names of a table?

后端 未结 12 1203
野的像风
野的像风 2020-12-05 07:03

Say I have a table called myTable. What is the SQL command to return all of the field names of this table? If the answer is database specific then I need SQL Server right

12条回答
  •  借酒劲吻你
    2020-12-05 07:24

    This is also MySQL Specific:

    show fields from [tablename];
    

    this doesnt just show the table names but it also pulls out all the info about the fields.

提交回复
热议问题