Case MySql returning blob type

1

I created a MySQL search query using case inside it. The problem is that when returning the value of the column that is of integer type, the value comes with the response blob .

Here is the SELECT with the result of the query below:

select 
max(b.sequencia),
case 
    when b.sequencia is null then '0'
    else max(b.sequencia)
end as Max 
from
    cad_tramitacao b 
where
    b.ficha = '187080' and b.arquivo = 'M' and b.incidente = "0";

    
asked by anonymous 29.11.2017 / 13:26

1 answer

0

Following the tip of @virgilio Novic, I just removed the quotation marks from '0' and it worked perfectly.

    
29.11.2017 / 14:20