0
example :
select
case
when campo = 1 then 'existe o resultado='aqui eu colocaria o nome da coluna da tabela 'fim da string'
else 0
end
from banco.tabela;
how would it have a way of concatenating?
0
example :
select
case
when campo = 1 then 'existe o resultado='aqui eu colocaria o nome da coluna da tabela 'fim da string'
else 0
end
from banco.tabela;
how would it have a way of concatenating?
4
To concatenate into the MySQL
have to use the function CONCAT
, would look like this:
SELECT
CASE
WHEN campo = 1 THEN CONCAT('existe o resultado=', banco.tabela.coluna, 'fim da string')
ELSE 0
END
FROM banco.tabela;
See more about the function CONCAT
here.
Browser other questions tagged mysql
You are not signed in. Login or sign up in order to post.