这个问题都是关于懒惰……我想做这样的事情:
select some_func(some_col), * from my_table
所以我不必这样做:
select some_func(some_col), col_1, col_2... col_ad_infinitum from my_table
ERROR 1064 (42000) at line 1: You have an error in your sql Syntax; check the manual that corresponds to your MysqL server version for the right Syntax to use near '* from my_table' at line 1
解决方法:
SELECT some_func(some_col), *
FROM my_table
产生这个错误?:
Error Code: 1064. You have an error in your sql Syntax; check the manual that corresponds to your MysqL server version for the right Syntax to use near ‘*’ at line 1
@H_502_41@SELECT *, some_func(some_col) FROM my_table
或者,如果您想先计算列,请执行此操作:
SELECT some_func(some_col), t.* FROM my_table AS t
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。