Région de recherche :

Date :

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

PostgreSQL COALESCE() Function - PostgreSQL Tutorial

The COALESCE() function accepts multiple arguments and returns the first argument that is not null. If all arguments are null, the COALESCE() function will return null. The COALESCE() function evaluates arguments from left to right until it finds the first non-null argument.

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

PostgreSQL: Documentation: 17: 9.18. Conditional Expressions

COALESCE(value [, ...]) The COALESCE function returns the first of its arguments that is not null. Null is returned only if all arguments are null. It is often used to substitute a default value for null values when data is retrieved for display, for example: SELECT COALESCE(description, short_description, '(none)') ...

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

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

Dans cet article, nous avons montré plusieurs façons d'utiliser la fonction SQL COALESCE(). Nous avons couvert comment utiliser COALESCE() pour remplacer les valeurs NULL, comment calculer une valeur alternative, et comment combiner COALESCE() avec la clause ROLLUP, entre autres exemples.

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

https://www.enterprisedb.com › postgres-tutorials › how-use-coalesce-postgresql

How to use COALESCE in PostgreSQL - EDB

COALESCE is a system in-built function that can be considered one of the conditional expressions available in PostgreSQL. NULLIF, GREATEST, LEAST, and COALESCE are the types of conditional expressions in PostgreSQL. The COALESCE function returns the first non-NULL expression in the specified list.

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

La fonction SQL Coalesce : Traitement des valeurs nulles

SQL Coalesce à la rescousse. Pour résoudre ce problème, nous allons utiliser la fonction SQL COALESCE, qui renvoie la première valeur non NULL d'une liste d'arguments que nous lui donnons. La fonction peut prendre autant d'arguments que nécessaire.

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

Learn the PostgreSQL COALESCE command - SQL Shack

In this blog, we discussed how to use the Postgres COALESCE command. The COALESCE command returns the first non-null value from the supplied input arguments. You should use the function where you predict the NULL values can be a problem.

Learn the PostgreSQL COALESCE command - SQL Shack

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

9.18. Expressions conditionnelles - PostgreSQL

L'expression SQL CASE est une expression conditionnelle générique, similaire à des instructions if/else dans les autres langages de programmation : CASE WHEN condition THEN result . [WHEN ...] [ELSE result] END. . Les clauses CASE peuvent être utilisées partout où une expression est valide.

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

9.17. Expressions conditionnelles - PostgreSQL

L'expression SQL CASE est une expression conditionnelle générique, similaire aux instructions if/else des autres langages de programmation : CASE WHEN condition THEN résultat . [WHEN ...] [ELSE résultat] END. Les clauses CASE peuvent être utilisées partout où une expression est valide.

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

9.17. Expressions conditionnelles - PostgreSQL

L'expression SQL CASE est une expression conditionnelle générique, similaire aux instructions if/else des autres langages de programmation : CASE WHEN condition THEN résultat . [WHEN ...] [ELSE résultat] END. Les clauses CASE peuvent être utilisées partout où une expression est valide.

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

PostgreSQL COALESCE Function: A Comprehensive Guide

The COALESCE function in PostgreSQL returns the first non-null argument. It is effectively equivalent to the ISNULL function in SQL Server. The syntax for COALESCE is as follows: COALESCE(value1, value2, ..., valueN)