I want to create a virtual column.
It is made of a column, a subquery and fixed string.
The current code uses the subquery as a string and it’s not executed.
SELECT X.vname, X.id, CONCAT(X.vname, '..' ,SELECT T.id FROM T WHERE T.x_id=X.id LIMIT 1, '..', 'some_text') FROM xtable AS X
Results as: vname_value..SELECT T.id FROM T WHERE T.x_id=X.id LIMIT 1..some_text
Try this, surround the sub-query with bracket