concatenation with a null column (using ||) nulls the result?
От | Neil Harkins |
---|---|
Тема | concatenation with a null column (using ||) nulls the result? |
Дата | |
Msg-id | Pine.SOL.4.10.10604101430250.2779-100000@well.com обсуждение исходный текст |
Ответы |
Re: concatenation with a null column (using ||) nulls the result?
Re: concatenation with a null column (using ||) nulls the result? Re: concatenation with a null column (using ||) nulls the |
Список | pgsql-sql |
inventory=> SELECT cabinets_name, cabinets_description FROM cabinets WHERE cabinets_datacenters = 2;cabinets_name | cabinets_description ---------------+----------------------548-4th-Cab2 |548-4th-RR1 |548-4th-RR2 |548-4th-Cab1 | (4 rows) inventory=> SELECT cabinets_name || ' - ' || cabinets_description AS concat FROM cabinets WHERE cabinets_datacenters = 2; concat ----------------- 548-4th-Cab1 - (4 rows) Note: The cabinets_description for the "548-4th-Cab1" row is " ", not NULL, hence it being displayed. Is this standard SQL behavior? Client is from rpm: postgresql-8.0.7-1.FC4.1 Server is from rpm: postgresql-server-8.0.7-1.FC4.1 -neil
В списке pgsql-sql по дате отправления: