“mysql ifnull” Respostas de código

mysql ifnull

##syntax:
SELECT IFNULL(col_with_null_value, default_value);

##you can see the result select with the string NA where the document is null:
SELECT IFNULL(user_document_id, 'NA');
Ivan The Terrible

mysql else if

IF condition1 THEN
    statements;
ELSEIF condition2 THEN # OPTIONAL
	statements;
ELSE # OPTIONAL
    statements;
END IF;
Scary Seahorse

Se o valor da coluna for nulo, então em Mysql

 SELECT 
    contactname, IFNULL(bizphone, homephone) phone
FROM
    contacts;
Ankur

Respostas semelhantes a “mysql ifnull”

Perguntas semelhantes a “mysql ifnull”

Mais respostas relacionadas para “mysql ifnull” em Sql

Procure respostas de código populares por idioma

Procurar outros idiomas de código