Select all columns except one in MySQL?

后端 未结 30 3268
后悔当初
后悔当初 2020-11-22 00:46

I\'m trying to use a select statement to get all of the columns from a certain MySQL table except one. Is there a simple way to do this?

EDIT: There are 53 columns i

30条回答
  •  深忆病人
    2020-11-22 01:08

    I would like to add another point of view in order to solve this problem, specially if you have a small number of columns to remove.

    You could use a DB tool like MySQL Workbench in order to generate the select statement for you, so you just have to manually remove those columns for the generated statement and copy it to your SQL script.

    In MySQL Workbench the way to generate it is:

    Right click on the table -> send to Sql Editor -> Select All Statement.

提交回复
热议问题