Région de recherche :

Date :

https://www.postgresqltutorial.com › postgresql-tutorial › postgresql-coalesce

PostgreSQL COALESCE() Function - PostgreSQL Tutorial

Learn how to use the COALESCE() function in PostgreSQL to return the first non-null argument from a list of arguments. See syntax, examples and applications of the COALESCE() function with table data and null values.

https://www.postgresql.org › docs › current › functions-conditional.html

PostgreSQL: Documentation: 17: 9.18. Conditional Expressions

COALESCE returns the first non-null argument from a list of arguments. It is often used to substitute a default value for null values when data is retrieved for display. Learn how to use COALESCE and other conditional expressions in PostgreSQL.

https://stackoverflow.com › questions › 27479180

Using COALESCE to handle NULL values in PostgreSQL

You can use COALESCE in conjunction with NULLIF for a short, efficient solution: COALESCE( NULLIF(yourField,'') , '0' ) The NULLIF function will return null if yourField is equal to the second value ( '' in the example), making the COALESCE function fully working on all cases:

https://docs.postgresql.fr › 10 › functions-conditional.html

9.17. Expressions conditionnelles - PostgreSQL

Apprenez à utiliser les expressions conditionnelles CASE, COALESCE, NULLIF, GREATEST et LEAST dans PostgreSQL. Ces fonctions SQL standard vous permettent de choisir, de remplacer ou de comparer des valeurs selon des conditions.

https://docs.postgresql.fr › 14 › functions-conditional.html

9.18. Expressions conditionnelles - PostgreSQL

COALESCE(value [, ...]) La fonction COALESCE renvoie le premier de ses arguments non NULL. NULL est renvoyé seulement si tous les arguments sont NULL. Elle est souvent utilisée pour substituer une valeur par défaut pour les valeurs NULL quand les données sont récupérées pour affichage. Par exemple :

https://learnsql.fr › blog › comment-utiliser-la-fonction-coalesce-en-sql

Comment utiliser la fonction COALESCE () en SQL - LearnSQL.fr

La fonction COALESCE () permet de gérer les valeurs NULL dans les requêtes SQL. Découvrez comment remplacer, concaténer ou calculer les valeurs NULL avec des exemples pratiques.

Comment utiliser la fonction COALESCE () en SQL - LearnSQL.fr

https://learnsql.fr › blog › la-fonction-sql-coalesce-traitement-des-valeurs-nulles

La fonction SQL Coalesce : Traitement des valeurs nulles

Apprenez à utiliser la fonction SQL Coalesce pour remplacer les valeurs NULL par des valeurs alternatives dans des expressions. Découvrez des exemples concrets avec les amendes de transit et les frais supplémentaires.

https://www.sqlshack.com › learn-the-postgresql-coalesce-command

Learn the PostgreSQL COALESCE command - SQL Shack

Learn how to use the COALESCE function in PostgreSQL to ignore or replace null values with non-null values. See syntax, usage, and examples with tables, strings, and calculated columns.

Learn the PostgreSQL COALESCE command - SQL Shack

https://medium.com › ... › postgresql-coalesce-function-handling-null-values-409a847a004e

PostgreSQL COALESCE Function: Handling NULL Values

Let’s explore the COALESCE PostgreSQL function, taking a look at what it is, what it does, its pros and cons, and when to use it to handle NULL values in some real-world examples.

https://www.mazer.dev › en › databases › postgresql › posts › postgresql-guide-coalesce-function

PostgreSQL COALESCE Function: A Comprehensive Guide

Learn how to use the COALESCE function in PostgreSQL to handle null values effectively. See examples of basic usage, combining with other functions, and using IS NULL or IS NOT NULL operators.