How can I “select *” from a table in MySQL but omit certain columns?

后端 未结 9 1403
时光取名叫无心
时光取名叫无心 2020-12-03 11:43

I have a table with the following columns:

id,name,age,surname,lastname,catgory,active

Instead of: SELECT name,age,surname,lastname,c

9条回答
  •  执笔经年
    2020-12-03 12:10

    You should not be using select * anyway. Enumerate the columns you want and only the columns you want, that is the best practice.

提交回复
热议问题