select a.keyword,a.keyalias,a.key_doc
,a.keyword+(CASE WHEN a.keyalias IS NULL THEN ' ' else '\\ '+a.keyalias END)+(CASE WHEN a.key_doc IS NULL THEN ' ' else ': '+a.key_doc END)
from myTableName a
------解决方案--------------------
select a.keyword,
a.keyalias,
a.key_doc,
a.keyword || decode(a.keyalias, NULL, ' ', '\\ ' || a.keyalias) ||decode(a.key_doc, NULL, ' ', ': ' || a.key_doc)
from myTableName a
------解决方案--------------------
select a.keyword,
a.keyalias,
a.key_doc,
decode(a.keyalias, null, ' ', '\\ ' || a.keyalias) ||
decode(a.key_doc, null, ' ', ': ' || a.key_doc)
from myTableName a;