例子:
SELECT
(
...
) AS imageName,
(
...
) AS imageURL,
CONCAT(imageName, ' ', imageURL)
我怎么能做到这一点?
您可以执行以下操作,但要注意表的别名:
SELECT
T.imageName, T.imageURL
CONCAT(imageName, ' ', imageURL)
FROM
(
SELECT
(
...
) AS imageName,
(
...
) AS imageURL
FROM ... AS innerT
) T
您可以在 CONCAT 中完成所有操作,如下所示:
select CONCAT(( select ... ), ' ', ( select ... ))