Search notes:

SQL: coalesce

The expression coalesce(p1, p2, … pₙ) evaluates to the first parameter (pₓ) that is not null.

Recursive definition of coalesce

The SQL expression coalesce can be defined recursively:
coalesce(p1, p2) is equivalent to the following case expression:
case
   when p1 is not null then p1
   else                     p2
end
coalesce(p1, p2, … pₙ) is equivalent to
case
   when p1 is not null then p1
   else coalesce(p₂, … pₙ)
end

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1740452875, '18.224.52.109', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/SQL/expression/coalesce(50): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78