1

I'm working with MariaDB. when I try to show some result don't show me nothing.

select 
    if(fecha is null,'hello','bye') dat
from 
    table

enter image description here

I'm trying to show me some result, but I don't know how?

Mau España
  • 124
  • 6

1 Answers1

0

You can use something like this

CREATE TABLE t1 (fecha  VARCHAR(2))
SELECT IF( COUNT(*) = 0 , 'Empty',`fecha`) FROM t1
| IF( COUNT(*) = 0 , 'EMpty',`fecha`) |
| :---------------------------------- |
| EMpty                               |

db<>fiddle here

nbk
  • 45,398
  • 8
  • 30
  • 47