DB2: Column-Aliases with Line-Breaks
Вопрос
Using DB2 9.7, is it possible to produce a result set where the column-headers contain line-breaks? Something like:
select field_name as "Line1<br>Line2" from table_name
I want the column-header to look like this:
Line1
Line2
However, this is not for HTML. Instead I'm wanting it to look this way when I run the query (raw) in my sql editor (Dbeaver) and in the CSV file I export from Dbeaver (so that the columns are narrower -- to prevent horizontal scrolling while viewing the result-set).
Решение
DB2 will allow you to use a new line character in a quoted identifier:
$ db2 'select ibmreqd "foo
> bar" from sysibm.sysdummy1'
foo
bar
-------
Y
1 record(s) selected.
The question is, will Dbeaver let you enter a new line character where you want it.
Не связан с dba.stackexchange