Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I have
select * from table where id = 3;
but I would like to also make a transformation on one column, so something like this:
select replace(aaa, 'a', 'b'), * from table where id = 3;
but this does not work. Anybody knows ?
原因是因为asterisk *在替换操作之后,尝试交换它,它会正常工作,
asterisk
*
select *, replace(aaa, 'a', 'b') from `table` where id = 3;
This should work:
select replace(aaa, 'a', 'b'), t.* from table t where id = 3;