我有一个包含很多列的 MySQL (v.5.6) 表,我想选择指定的列作为第一列 - 然后是所有其他列 - 以查看数据。
select *, column from table; --is allowed
select column, * from table; --MySQL error 1064
为什么?解决方法?
谢谢
最佳答案
你不能做 1 + all other,但是你可以通过使用 table.* 做 1 + all them.*
SELECT col1, t.* FROM table t
这将选择 col1 两次,但其他工作正常。
关于MySQL select - 首先获取指定的列,然后是所有其他列(星号) - 错误 1064,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54199924/