Oracle concatenates values of different columns into a string-use the concatenation operator ldquo; | rdquo; or CONCAT (
Oracle concatenates values of different columns into a string-use the concatenation operator ldquo; | rdquo; or CONCAT (
Oracle concatenates values of different columns into a string
-- Concatenates values of different columns into a string using the concatenation operator "|" or CONCAT ('','').
-- Method 1: Recommended
Select s. TEAM | '**' | S. NAME | '**' | S. JOB_NUMBER
From staff s where s. PASS = '20180101' and s. TEAM = 'south'
-- Method 2: tedious.
Select concat (S. TEAM, '**'), S. NAME), '**'), S. JOB_NUMBER)
From staff s where s. PASS = '20180101' and s. TEAM = 'south'
-- The results are the same as follows:
South China ** Chen moumou ** 110320
South ** Peng moumou ** 119008
South ** Huang moumou ** 119083
,