I use the following SQL to concatenate several database columns from one table into one column in the result set:
SELECT (field1 + \'\' + field2 + \'\' + field
The SQL standard way of doing this would be:
SELECT COALESCE(field1, '') || COALESCE(field2, '') || COALESCE(field3, '') FROM table1
Example:
INSERT INTO table1 VALUES ('hello', null, 'world'); SELECT COALESCE(field1, '') || COALESCE(field2, '') || COALESCE(field3, '') FROM table1; helloworld